36
42
98
196
218
第1题:
A.类rectangle的私有派生类是location
B.类rectangle中的public成员在类location中是私有的
C.类location中的public成员在类rectangle中是不可访问的
D.viodf(){Rectangler;intX=r.GetX();}其中intX=r.GetX();是非法语句
第2题:
下列程序的执行结果为【 】。
include <iostream. h>
class Point
{
public:
Point(double i, double j) { x=i; y=j;}
double Area() const { return 0.0;}
private:
double x, y;
};
class Rectangle: public Point
{
public:
Rectangle(double i, double j, double k, double 1)
double Area() const {return w * h;}
private:
double w, h;
};
Rectangle: :Rectangle(double i, double j, double k. double 1): Point(i,j).
{
w=k, h=1
}
void fun(Point &s)
{
cout<<s. Area()<<end1;
}
void main( )
{
Rectangle rec(3.0, 5.2, 15.0. 25.0);
fun(rec)
}
第3题:
第4题:
吸收塔每层喷淋的喷嘴有()个。
第5题:
人体安全电压最高是()V。
第6题:
按住Ctrl键Rectangle可以画()。
第7题:
进行汽车二级维护前,检测分电器的触点闭合角应为()°。
第8题:
4
8
12
16
18
第9题:
10%
50%
70%
75%
80%
第10题:
directions
dangers
exclusion areas
All of the above
第11题:
The rectangle drawn will have a total width of 5 pixels.
The rectangle drawn will have a total height of 6 pixels.
The rectangle drawn will have a total width of 10 pixels.
The rectangle drawn will have a total height of 11 pixels.
第12题:
第13题:
阅读以下说明和C++代码,填入(n)处。
[说明]
以下C++代码使用虚函数实现了同一基类shape派生出来的Class rectangle、Class triangle、Class circle实现了计算矩形、圆形面积的计算。仔细阅读以下代码,将(n)处语句补充完整。
[代码5-1]
include<iostream.h>
define PI 3.14159
class shape {//基类
protected:
(1);
public:
(2);
(3);
};
[代码5-2]
class rectangle: public shape {
public:
rectangle (int x2,int y2,int r2): (4) {};
double area ( ) {return x*y; };
};
class circle: public shape {
public:
circle (int x3,int y3,int r3):(5){};
double area ( ) {return r*r*PI; };
};
[代码5-3]
void main ( )
{
rectangle r (10,20,0);
circle c (0,0,30);
shape (6);
cout<<"长方形面积="<<s1->area ( ) <<endl;
cout<<"圆形面积="<<s2->area ( ) <<endl;
}
[运行结果]
长方形面积=200
圆形面积=2827.43
第14题:
使用VC6打开考生文件夹下的工程test1_1,此工程包含一个源程序文件test1_1.cpp,但该程序运行有问题,请改正main函数中的错误,使该程序的输出结果如下:
Constructor called.
Default constructor called.
Area is 6
Area is 0
Area is 6
源程序文件test1_1,cpp清单如下:
include<iostream.h>
class RectAngle
{
private:
double ledge,sedge;
public:
RectAngle()
{
cout<<"Default constructor called.";
}
RectAngle(double l,double s)
{
ledge=l;sedge=s;
cout<<"Constructor called.";
}
void Set(double l,double s)
{
ledge=l;sedge=s;
}
void Area()
{
cout<<"Area is"<<ledge*sedge<<endl;
}
};
void main()
{
/***************** found *****************/
RectAngle Rect1(2,3);
RectAngle Rect2(1);
/**************** found *****************/
RectAnglC Rect3;
Rectl.Area();
/***************** found *****************/
RecL2.lodge=0;Rect2.sedge=0;
Reck2.Area();
Rect3.Area();
}
第15题:
第16题:
AutoCAD中设置图幅用()命令。
第17题:
我国规定的安全电压是指不大于()V的电压。
第18题:
Which statements concerning the effect of the statement gfx.drawRect(5, 5, 10, 10) are true, given that gfx is a reference to a valid Graphics object?()
第19题:
我国规定安全电压是()V。
第20题:
Rectangle类和Circle类都有名为area的属性,这两个属性一定是相同的属性
Rectangle类和Circle类都有名为getArea的操作,这两个操作一定是相同的操作
Rectangle中名为length的属性和Circle类中名为radius的属性,这两个属性一定是不同的属性
Shape类有一个属性,Circle类有两个属性,Rectangle类有三个属性
第21题:
20
25
45
50
70
第22题:
36
42
98
196
218
第23题:
13n
17n
26n
34n
60n
第24题:
directions
distances
locations
All of the above