题目内容

Questions 22 to 25 are based on the conversation yon have just heard.

A. Love for beauty and a desire to impress other people.
B. A desire to express oneself and a display of one’s wealth.
C. Individual taste and love for beauty.
D. Individual taste and a desire to express oneself.

查看答案
更多问题

阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内。【说明】以下程序的功能是计算三角形、矩形和正方形的周长并输出。 程序由4个类组成:类Triangle、Rectangle和Square分别表示三角形、矩形和正方形;抽象类 Figure提供了一个纯虚拟函数getGirth(),作为计算上述3种图形周长的通用接口。【C++程序】# include < iostream. h ># include < math. h >class Figure { public: virtual double getGirth() =0; //纯虚拟函数 };class Rectangle: (1) { protected: double height; double width; public: Rectangle(){}; Rectangle( double height, double width) { this→height = height; this→width = width; } double getGirth ( ) { return (2) ; }}; class Square: (3) {public: Square( double width) { (4) ; } };class Triangle: (5) { double la; double lb; double lc; public: Triangle( double la,double lb,double lc){ this→la = la; this→Lb = lb; this→lc = lc; } double getGirth ( ) { } return la + lb + lc; }};void main( ) { Figure * figures[ 3 ] = { new Triangle ( 2,3,3 ),new Rectangle (5,8) , new Square (5) }; for (inti =0;i<3;i++){ cout < < "figures [" < < i < <" ] girth =" < < ( figures [ i ] ) →getGirth ( ) < < end1; }}

Questions 11 to 18 are based on the conversation yon have just heard.

A. It is rainy.
B. It is sunny.
C. It is fine.
D. It is cloudy.

阅读下列程序说明和C++程序,把应填入其中(n)处的字句,写对应栏内。【说明】 下面的程序实现了类String的构造函数、析构函数和赋值函数。 已知类String的原型为:class String{ public: String(coust char * str = NULL); //普通构造函数 String( const String &other); //拷贝构造函数 ~String(void); //析构函数 String & operate =(const String &other); //赋值函数 private: char * m_data; // 用于保存字符串};//String 的析构函数String:: ~String (void){ (1) ;}//String 的普通构造函数String: :String( const char * str){ if (2) { m_data = new char[1]; *m_data = ’\0’; } else { int length = strlen(str); m_data = new ehar[ length + 1 ]; strepy(m_data, str); }}//拷贝的构造函数String:: String( const String &other){ int length = strlen(other. m_data); m_data = new char[ length + 1 ]; strepy(m_data, other, m_data); //赋值函数String & String::operate = (eonst String &other) //{ if (3) return * this; delete [] m_clara; //释放原有的内存资源 int length = strlen( other, m_data); m_data = new chart length + 1 ]; (4) ; return (5) ;}

Questions 32 to 35 are based on the passage you have just heard.

A. In the 17th century.
B. In the 1Sth century.
C. In the 18th century.
D. In the 16th century.

答案查题题库