第1题:
A.Pointp=newPoint();
B.Line.Pointp=newLine.Point();
C.ThePointclasscannotbeinstatiatedatline15.
D.Line1=newLine();1.Pointp=new1.Point();
第2题:
A.Point p = new Point();
B.Line.Point p = new Line.Point();
C.The Point class cannot be instatiated at line 15.
D.Line l = new Line() ; l.Point p = new l.Point();
第3题:
A.Point p = Line.getPoint();
B.Line.Point p = Line.getPoint();
C.Point p = (new Line()).getPoint();
D.Line.Point p = (new Line()).getPoint();
第4题:
Which statement about the deck line is TRUE ________.
A.The top of the deck line is marked at the highest point of the freeboard deck,including camber,at the midships point
B.A vessel with wooden planks on a steel deck will have the deck line marked at the intersection of the upper line of the wood sheathing with the side shell
C.The deck edge is marked at the intersection of the freeboard deck with the side shell,at the lowest point of sheer,with the vessel at even trim
D.On a vessel with a rounded stringer-sheer plate,the deck line is marked where the stringer plate turns down from the plane of the deck line
第5题:
10. class Line { 11. public static class Point { } 12. } 13. 14. class Triangle { 15. // insert code here 16. } Which code, inserted at line 15, creates an instance of the Point class defined in Line?()
第6题:
1. public class Exception Test { 2. class TestException extends Exception {} 3. public void runTest() throws TestException {} 4. public void test() /* Point X */ { 5. runTest(); 6. } 7. } At Point X on line 4, which code is necessary to make the code compile?()
第7题:
10. class Line { 11. public class Point { public int x,y; } 12. public Point getPoint() { return new Point(); } 13. } 14. class Triangle { 15. public Triangle() { 16. // insert code here 17. } 18. } Which code, inserted at line 16, correctly retrieves a local instance of a Point object?()
第8题:
Line 16
Line 17
Line 18
Line 19
第9题:
把设计器的Interval属性设置为1
把For k=Line1.X1 To Line2.X1 Step 100和Next k两行删除
把Fork=Line1.X1 To Line2.X1 Step 100改为For k=Line2.X1 To Line1.X1 Step l00
把If Shape1Left+Shape1.Width<Line2.X1 Then改为If Shape1.Left<Line2.X1 Then
第10题:
Point p = Line.getPoint();
Line.Point p = Line.getPoint();
Point p = (new Line()).getPoint();
Line.Point p = (new Line()).getPoint();
第11题:
Put one line at the low point and one at the high point of the bollard so they don't touch
Take the eye of the second line up through the eye of the first line before putting the second line on the bollard
Never put two mooring lines on the same bollard
The mooring line forward should be put on the bollard first
第12题:
(-4, -2)
(-1,1)
(2,1)
(4,2)
(7,3.5)
第13题:
阅读下列C++程序和程序说明,将应填入(n)处的字句写在对应栏内。
【说明】Point是平面坐标系上的点类,Line是从Point派生出来的直线类。
include <iostream.h>
class Point
{public:
Point (int x, int y) ;
Point (Point &p) ;
~Point();
void set (double x, double y) ;
void print();
private:double X,Y;
};
Point::Point (int x, int y) //Point 构造函数
{X=x; Y=y; }
Point::Point ( (1) ) //Point 拷贝构造函数
{X=p.X; Y=p.Y;}
void Point::set (double x, double y)
{X=x; Y=y; }
void Point::print()
{cout<<' ('<<X<<","<<Y<<") "<<endl; }
Point::~Point()
{cout<<"Point 的析构函数被调用! "<<endl;
class Line: public Point
{public:
Line (int x, int y, int k) ;
Line (Line &s) ;
~Line();
void set (double x, double y, double k)
void print();
private:double K;
};
(2)//Line 构造函数实现
{ K=k;}
(3)//Line 拷贝构造函数实现
{K=s.K;}
void Line::set (double x, double y, double k)
{ (4);
K=k;
}
void Line::print()
{cout<<" 直线经过点";
(5);
cout<<"斜率为: k="<<K<<endl;
}
Line: :~Line()
{cout<<"Line 析构函数被调用! "<<endl;
}
void main()
{Line 11 (1,1,2) ;
11 .print();
Linel2 (11) ;
12.set (3,2,1) ;
12.print();
}
第14题:
A.Line4ofclassTargetcanbechangedtoreturni++;
B.Line2ofclassTargetcanbechangedtoprivateinti=1;
C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){
D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;
第15题:
窗体的左右两端各有1直线,名称分别为Line1、Line2;名称为Shape1的圆靠在左边的Linel直线上(见图);另有1个名称为Timer1的计时器控件,其Enabled属性值是True。要求程序运行后,圆每秒向右移动100,当圆遇到Line2时则停止移动。为实现上述功能,某人把计时器的Interva1属性设置为1000,并编写了如下程序:
Private Sub Timer1 Timer( )
For k=Line1.X1 To Line2.X1 Step 100
If Shape1.Left+Shape1.width<Line2.X1 Then
Shape1.Left=Shape1.Left+100
End If
Next k
End Sub
运行程序时发现圆立即移动到了右边的直线处,与题目要求的移动方式不符。为得到与题目要求相符的结果,下面修改方案中正确的是( )。
A.把计时器的Interval属性设置为1
B.把For k=line1.X1 To Line2.X1 Step 100和Next k两行删除
C.把For k=Line1.X1 To Line2.X1Step 100改为For k=Line2.X1 To Line1.X1 Step 100
D.把If Shape1.Left+Shepe1.Width<Line2.X1 Then改为If Shape1.Left<Line2.X1 Then
第16题:
使用VC6打开考生文件夹下的工程RevProj14。此工程包含一个源程序文件RevMain14.cpp,但该程序中类的定义有错误。请改正程序中的错误,使它能得到正确结果。
注意,不要改动main函数,不得删行或增行,也不得更改程序的结构。
源程序文件RevMain14.cpp中的程序清单如下:
//RevMain14.cpp
include<iostream>
include<math>
using namespace std;
class Point
{
private:
double x;
double y;
public:
Point(){}
void Point(double x1,double y1)
{
x=x1;
y=y1;
}
void setvalue(double x,double y)
{
x=x;
y=y;
}
double getx ()
{
return x;
}
double gety()
}
return y;
}
void print()
{
cout<<"x="<<x<<",y= "<<y<<end1;
}
~Point(){}
};
class Line
{
private:
Point p1;
Point p2;
double width;
public:
Line(double x1,double y1,double x2,double y2,double d)
:p1(x1,y1),p2(x2,y2)
{
width=d;
}
~Line(){}
void displength()
{
double 1;
1=sqrt((p1.getx{)-p2.getx())*(p1.getx()-p2-getx())+
(p1.gety()-p2.gety())*(p1.gety()-p2.gety()));
cout<<"the length of Line is "<<1<<end1;
}
};
int main()
{
Line *p1;
Line 1(5,15,25,35,0.5);
p1=&1;
p1->displength();
return 0;
}
第17题:
55.int[]x={1,2,3,4,5}; 56.inty[]=x; 57.System.out.println(y[2]); Whichistrue?()
第18题:
在显示多条小区覆盖连线时,需要勾选哪几项() 1.Leaye trail 2.Serving cell line 3.Line to added cell 4.Line to removed cell
第19题:
当ADSL线路有问题是可以把网线插在()
第20题:
Line1.X1=Line2.X2且Line1.Y1=Line2.Y2
Line1.X1=Line2.Y1且Line1.Y1=Line2.X1
Linel.X2=Line2.X1且Line1.Y1=Line2.Y2
Line1.X2=Line2.X1且Line1.Y2=Line2.Y2
第21题:
y=3x+2
y=2x+1
y=-x+5
y=-2
y=-6
第22题:
x+y=5
x - y = 1
3x-2y = 10
x2 -y=5
x +y2 = 7
第23题:
Point p = new Point();
Line.Point p = new Line.Point();
The Point class cannot be instatiated at line 15.
Line 1 = new Line() ; 1.Point p = new 1.Point();