第1题:
使用VC6打开考生文什夹下的工程test1_3。此工程包含一个test1_3.cpp,其中定义了类circle和column,其中column类由circle类protected派生,但两个类的定义并不完整。请按要求完成下列操作,将程序补充完整。
(1)定义类circle的保护数据成员r和area,它们都是double型的数据。请在注释“//**1**”之后添加适当的语句。
(2)添加类circle的无参数的构造函数,使circle对象的r默认值为0,请在汁释“//**2**”之后添加适当的语句。
(3)添加派生类column构造函数的定义,传入的参数为double型的height和radius,并将具分别赋值给数擗成员h和基类的r,请在注释“//**3**”之后添加适当的语句。
(4)完成派生类column的成员函数print的定义,使其以格式“r=_area=_”先输出半径r和底面积area,再以格式“h=_vol=_”输出高h和体积vol的值,请在注释“//**4**”之后添加适当的语句。
输山结果如下:
r=1 area=3.1416
h=2 vo1=6.2832
注意:除在指定的位置添加语句外,请不要改动程序中的其他语句。
源程序文件test1_3.cpp清单如下:
include<iostream.h>
const double pi=3.1416;
class circle
{
protected:
//**1**
public:
//**2**
circle(double radius){ r=radius;}
void print()
{
area=r*r*pi;
cout<<"r="<<r<<" "<<"area="<<ared<<endl;
}
};
class column: protected circle
{
protected:
double h;
public:
//** 3 **
void print()
{
// ** 4 **
}
};
void main()
{
column col(1.0,2.0);
Col.print();
}
第2题:
A line of position from a celestial observation is a segment of a ______.
A.circle of equal altitude
B.parallel of declination
C.parallel of altitude
D.vertical circle
第3题:
What is the major advantage of a rhumb line track?
A.The vessel can steam on a constant heading (disregarding wind,current,etc)
B.The rhumb line is the shortest distance between the arrival and departure points
C.It is easily plotted on a gnomonic chart for comparison with a great circle course
D.It approximates a great circle on east-west courses in high latitudes
第4题:
当设置了容器对象的DrawWidth属性后,会影响()
第5题:
下列属于Visual Basic工程文件的是()。
第6题:
Rectangle类和Circle类都有名为area的属性,这两个属性一定是相同的属性
Rectangle类和Circle类都有名为getArea的操作,这两个操作一定是相同的操作
Rectangle中名为length的属性和Circle类中名为radius的属性,这两个属性一定是不同的属性
Shape类有一个属性,Circle类有两个属性,Rectangle类有三个属性
第7题:
distance
largeness
diameter
measurerment
第8题:
y=3x+2
y=2x+1
y=-x+5
y=-2
y=-6
第9题:
4π
8π
12π
16π
64π
第10题:
the deck line
Plimsoll disc
Plimsoll line
summer load line
第11题:
Shape
Circle
ShapeCircle
程序有错误
第12题:
125 mm
183 mm
215 mm
It depends on outside pipe diameter
第13题:
当对Draw Width进行设置后,将影响( )。
A.Line、Circle、Pset方法
B.Line、Shape控件
C.Line、Circle、Point方法
D.Line、Circle、Pset方法和Line、Shape控件
第14题:
What defines a great circle?
A.A curved line drawn on a Mercator Chart
B.A course line that inscribes a loxodromic curve
C.The shortest distance between any two points on the earth
D.The smallest circle that can be drawn on the face of a sphere
第15题:
第16题:
当对DrawWidth进行设置后,将影响()。
第17题:
第18题:
6π-2πx
6π-πx2
12π-2πx
36π-2πx
36π-πx2
第19题:
第20题:
2A
4A
8A
16A
32A
第21题:
3/2
2/3
4/9
1/4
9/4
第22题:
Ⅰ only
Ⅱ only
Ⅲ only
Ⅰ, Ⅱ and Ⅲ
Ⅱ and Ⅲ only
第23题:
Greenwich celestial meridian
hour circle of the body
local celestial meridian
vertical circle of the body
第24题:
16%
20%
40%
80%
96%