问题 单项选择题

Which city got the most room reservations last summer().

A.Orlando.

B.Honolulu.

C.Las Vegas.

D.Boston.

答案

参考答案:C

解析:

[听力原文]31-35 Travelers are booking hotel rooms in cities closer to home this summer, with the exception of two European magnets, according to a new survey. Las Vegas scored the most July and August room reservations for the second year in a row, while another gambling Mecca, Reno, along with Honolulu moved onto the top 10 list for the first time, according to a tally of seasonal bookings from Hotels. com. Las Vegas has successfully pitched itself as an alternative family destination even in the desert’ s hottest months. It’s like a theme park city. Almost every hotel has a theme park inside it, so there’s a lot to do for families. Orlando displaced the Big Apple in the No. 2 spot, San Francisco moved up a notch into fifth place and Miami dropped out of the running, probably because of a decline in international tourism, Hotels. com president Bob Diener said. Paris’s slip to No. 10 from No. 5 last year wasn’t surprising given some Americans’ resentment of France’s lack of support for U.S. policy in Iraq, Diener said. But the omission of Boston was unexpected, especially in a year in which patriotism is a resounding theme in travel marketing, he said. Overall summer travel is expected to rise 2.5 percent this year, with 83 percent of Americans planning at least one trip and 28 percent planning to travel more than last year, according to studies from the Travel Industry Association.

[分析]: 细节信息。 题干:哪个城市的房间预定是最多的 根据原文“Las Vegas scored the most July and August room reservations for the second year in a row…”,译文为:拉斯维加斯第二年的房间预定数是最多的……。所以选c。

问答题

请使用VC6或使用[答题]菜单打开考生文件夹proj3下的工程proj3,其中声明了SortedList类,是一个用于表示有序数据表的类。其成员函数insert的功能是将一个数据插入到一个有序表中,使得该数据表仍然保持有序。请编写这个insert函数。程序的正确输出应为:
插入前:
1,2,4,5,7,8,10
插入6和3后:
1,2,3,4,5,6,7,8,10
要求:
补充编制的内容写在“//********333********”与“//********666********”之间。不得修改程序的其他部分。
注意:程序最后将结果输出到文件out.dat中。输出函数writeToFile已经编译为obj文件,并且在本程序中调用。
//SortedList.h
#include<iostream>
using namespace std;
class SortedList //有序数据表类
int len;
double*d;
public:
SortedList(int len,double data[]=NULL);
~SortedList()delete[]d;
int length()constreturn len;//有序数据表长度(即元素的个数)
double getElement(int i)constreturn d[i];
void insert(double data);
void show()const;//显示有序数据表
;
void writeToFile(char*,const Sort-edlist &);
//main.cpp
#include"SortedList.h"
SortedList::SortedList (int len,double data[]):len(len)
d=new double[len];
for(int k=0;k<len;k++)
d[k]=(data==NULL0.0:data[k]);
for(int i=0;i<len-1;i++)
int m=i;
for(int j=i;j<len;j++)
if(d[j]<d[m])m=j;
double t=d[m];
d[m]=d[i];
d[i]=t;



void SortedList::insert(double data)
//********333********
//********666********

void SortedList::show()const
//显示有序数据表
for(int i=0;i<len-1;i++)
cout<<d[i]<<",";
cout<<d[len-1]<<endl;

int main ()
double s[]=5,8,1,2,10,4,7;
SortedList list(7,s);
cout<<"插入前:"<<endl;
list.show();
list.insert(6.0 );
list.insert(3.0);
list.show();
writeToFile(" ",list);
return 0;

判断题