16%
20%
40%
80%
96%
第1题:
( 13 )补充完整下面的类定义:
const double PI=3 .14;
class Circle{ // 圆形物体的抽象基类
protected:
double r; // 半径
public:
Circle ( double radius=0 ) : r ( radius ) {}
【 13 】 ; // 计算圆形物体表面积的纯虚函数声明
};
class Cylinder:public Circle { // 圆柱体类
double h; // 高度
public:
Cylindr ( double radius=0, doubli height=0 ) :
Circle ( radius ) , h ( height ) {}
Virtual double Area () { // 计算圆柱体的表面积
return 2*PI*r* ( r+h ) ;
}
};
第2题:
下列程序中,先声明一个圆类circle和一个桌子类table,另外声明一个圆桌类roundtable,它是由 circle和table两个类派生的,要求声明一个圆桌类对象,并输出圆桌的高度,面积和颜色。请填空完成程序
include<iostream.h>
include<string.h>
class circle{
double radius;
public:
circle(double r){radius=r;}
double get_area(){return 3.416*radius*radius;}
};
class table{
double height;
public:
table(double h)<height=h;}
double get_height(){return height;}
};
class roundtable:public table,public circle{
char *color;
public:
roundtable(double h,double r,char c[]): 【 】 {
color=new char[strlen(c) +1];
【 】;
};
char*get_color(){return color;}
}:
void main(){
roundtable rt(0.8,1.0,“白色”);
cout<<"圆桌的高:"<<rt. get_height()<<end1;
cout<<"圆桌面积:"<<rt.get_area()<<end1;
cout<<"圆桌颜色:"<<n.get color()<<end1;
}
第3题:
病室内适宜的温度、湿度应为()。
第4题:
成功的两大关键“WHY”和“HOW”分别占多大比例()?
第5题:
10%
50%
70%
75%
80%
第6题:
20
40
60
80
120
第7题:
第8题:
The increase of life expectancy in developing countries.
The lowing of infant mortality rates.
The increase of university enrolment by 80%.
The increased access to safe drinking water and basic sanitation.
第9题:
3/2
2/3
4/9
1/4
9/4
第10题:
public class Circle implements Shape { private int radius; }
public abstract class Circle extends Shape { private int radius; }
public class Circle extends Shape { private int radius; public void draw(); }
public abstract class Circle implements Shape { private int radius; public void draw(); }
public class Circle extends Shape { private int radius;public void draw() {/* code here */} }
public abstract class Circle implements Shape { private int radius;public void draw() { / code here */ } }
第11题:
5%-10%.
10%-15%.
30%-45%.
40%-55%.
第12题:
16 pounds.
35 pounds.
30 pounds.
40 pounds.
第13题:
A The product should finance itself ;
B Well, it seems that we underestimated the costs ;
C You only need a budget increase for the first order
第14题:
根据程序中的注释将下列缺失部分补充完整。
class Point{
int x,y; //点的x和y坐标
public:
Point(int xx=0,int yy=0):x(xx),y(yy){}
};
class Circle{
Point center;//圆心位置
int radius; //半径
public: //利用cx和cY分别初始化圆心的x和y坐标
circle(int cx,int cy,int r): 【 】 ,radius(r){}
void area()(cout<<3.14159*radius*radius<<end1;)
};
第15题:
下面哪个表达式正确使用了math()?
第16题:
public abstract class Shape { private int x; private int y; public abstract void draw(); public void setAnchor(int x, int y) { this.x = x; this.y = y; } } Which two classes use the Shape class correctly?()
第17题:
6π-2πx
6π-πx2
12π-2πx
36π-2πx
36π-πx2
第18题:
40/20/40
40/40/20
80/10/10
10/10/80
5/40/55
第19题:
2A
4A
8A
16A
32A
第20题:
4π
8π
12π
16π
64π
第21题:
40%
60%
80%
120%
150%
第22题:
£25.
£40.
£50.
第23题:
18℃~22℃,50%~60%
16℃~20℃,30%~40%
18℃~22℃,60%~70%
22℃~24℃,30%~40%
20℃~24℃,60%~80%
第24题:
16%
20%
40%
80%
96%