20
25
45
50
70
第1题:
使用RECTANGLE命令绘制一个矩形,并使该矩形具有厚度为100。正确的方法为()。
A.用RECTANGLE命令先绘一个矩形,然后用ELEV命令设置厚度为100
B.用ELEV命令设置厚度为100,然后用RECTANGLE命令绘制矩形
C.用RECTANGLE命令先绘一个矩形,然后用CHANGE命令改变厚度为100
D.在RECTANGLE命令中先设置其厚度为100,然后再绘制矩形
E.用RECTANGLE命令先绘一个矩形,然后再用RECTANGLE命令设置厚度为100
第2题:
( ) looking at the positive side of life, he always pays attention to the negative side,
A、More than
B、Except for
C、Except
D、Rather than
第3题:
阅读以下说明和Java源程序,将应填入(n)处的字句写在答题纸的对应栏内。
说明
以下程序的功能是计算三角形、矩形和正方形的面积并输出。
程序由5个类组成:AreaTest是主类,类Triangle、Rectangle和Square分别表示三角形、矩形和正方形,抽象类Figure提供了一个计算面积的抽象方法。
程序
public class AreaTest{
public static void main(String args[]){
Figure[]figures={
new Triangle(2,3,3),new Rectangle(5,8), new Square(5)
};
for(int i=0;i<figures.1ength;i++){
System.out.println(figures[i]+"area="+figures[i].getArea());
}
}
}
public abstract class Figure{
public abstract double SetAJea();
public class Rectangle extends (1) {
double height;
double width;
public Rectangle(double height,double width){
this.height=height;
this.width=width;
}
public String toString(){
return "Rectangle:height="+height+",width="+width+":";
}
public double getArea() { return (2);
} } public class Square extends (3) {
public Square(double width) {
(4);
}
public String toString() {
return "Square:width="+width+":";
} } public class Triangle extends (5). {
double la;
double lb;
double lc;
public Triangle(double la,double lb,double lc) {
this.la=la; this.lb=lb; this.lc=lc;
public String toString(){
return "Triangle: sides="+la+","+lb+","+lc+":";
public double getArea() {
double s=(la+lb+lc)/2.0;
return Math.sqrt(s*(s-la)*(s-lb)*(s?1c));
}
}
第4题:
使用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();
}
第5题:
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?()
第6题:
4
8
12
16
18
第7题:
10%
50%
70%
75%
80%
第8题:
第9题:
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.
第10题:
第11题:
The area of the left side of a woman’s brain for language learning develops better than that of a man’s.
The right side of a woman’s brain for language develops better than that of a man’s.
The area of the left side of a woman’s brain for feelings develops better than that of a man’s.
The area of the right side of a woman’s brain fit for seeing in the dark develops better than that of a man’s.
第12题:
one
two
three
four
第13题:
China’s space station, ________ three capsules and covering an area of no less than 60 square meters, will be completed within 10 years.
A、making up of
B、made up
C、consisted of
D、consisting of
第14题:
阅读以下说明和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
第15题:
下列程序的执行结果为【 】。
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)
}
第16题:
阅读以下说明和C++程序,将应填入(n)处的字句写在对应栏内
[说明]
以下程序的功能是计算三角形、矩形和正方形的面积并输出。
程序由4个类组成:类Triangle,Rectangle和Square分别表示三角形、矩形和正方形;抽象类Figure提供了一个纯虚拟函数getArea(),作为计算上述三种图形面积的通用接口。
[C++程序]
include<iostream.h>
include<math.h>
class Figure{
public:
virtual double getArea()=0; //纯虚拟函数
};
class Rectangle: (1) {
protected:
double height;
double width;
public:
Rectangle(){};
Rectangle(double height,double width){
This->height=height;
This->width=width;
}
double getarea(){
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->ib;this->lc;
}
double getArea(){
double s=(la+lb+lc)/2.0;
return sqrt(s*(s-la)**(s-lb)*(s-lc));
}
};
viod main(){
figure*figures[3]={
new triangle(2,3,3),new Rectangle(5,8),new Square(5)};
for(int i=0; i<3;i++){
cout<<"figures["<<i<<"]area="<<(figures)->getarea()<<endl;
}
}
};
第17题:
12
16
20
25
36
第18题:
Rectangle类和Circle类都有名为area的属性,这两个属性一定是相同的属性
Rectangle类和Circle类都有名为getArea的操作,这两个操作一定是相同的操作
Rectangle中名为length的属性和Circle类中名为radius的属性,这两个属性一定是不同的属性
Shape类有一个属性,Circle类有两个属性,Rectangle类有三个属性
第19题:
by more than 5 percent
by less than 10 percent
to 95 percent
to less than 90 percent
第20题:
36
42
98
196
218
第21题:
13n
17n
26n
34n
60n
第22题:
9
15
42
108
44
第23题:
To be smaller in size than another group.
To be more in number than another group.
To be bigger in area than another group.
To be smaller in area than another group.