对
错
第1题:
下面程序的输出结果是( )。 #include <iostream> using namespace std; class point { public: point(int px=10,int py=10){ x=px;y=py;} getpx( ) { return x;} getpy( ) { return y;} private: int x,y; }; void main(voiD) { point p,q(15,15); cout<<"p点的坐标是:"<<p. getpx( )<<" ,"; cout<<p. getpy( )<<endl; cout<<"q点的坐标是:"<<q. getpx( )<<" ,"; cout<<q. getpy( ); }
A.p点的坐标是:10,10 q点的坐标是:15,15
B.p点的坐标是:0,0 q点的坐标是:15,15
C.p点的坐标是:0,0 q点的坐标是:0,0
D.p点的坐标是:10,10 q点的坐标是:10,10
第2题:
阅读下列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();
}
第3题:
以下哪些工具按钮都是在“绘图”工具栏中()。
以下哪些工具按钮都是在“绘图”工具栏中D.
A.直线、点、复制、多行文字
B.直线、图案填充、偏移、多行文字
C.创建块、点、复制、样条曲线
D、直线、点、表格、矩形
第4题:
以下哪些工具按钮都是在“绘图”工具栏中()。
第5题:
信令点A至信令点D的TUP信令业务传递需通过信令转接点B和C进行,如何创建信令点A至信令点D的信令路由集A--B--C--D()
第6题:
阅读以下说明和C代码,将应填入(n)处的字句写在的对应栏内。
【说明】
在一个简化的绘图程序中,支持的图形种类有点(point)和圆(circle),在设计过程中采用面向对象思想,认为所有的点和圆都是一种图形(shape),并定义了类型shape t、 point t和circle t分别表示基本图形、点和圆,并且点和圆具有基本图形的所有特征。
【C代码】
typedef enum { point,circle } shape type; /* 程序中的两种图形:点和圆 */
typedef struct { /* 基本的图形类型 */
shape_type type; /* 图形中类标识:点或者圆*/
void (*destroy) (); /* 销毁图形操作的函数指针*/
void (*draw) (); /* 绘制图形操作的函数指针*/
} shape_t;
typedef struct { shape_t common; int x; iht y; } point_t; /* 定义点类
型, x, y为点坐标*/
void destroyPoint (point_t* this) { free (this); printf ("Point destoryed!
\n"); } ) /* 销毁点对象*/
void drawPoint(point_t* this) { printf("P(%d,%d)", this->x, this->y); }
/* 绘制点对象*/
shape_t* createPoint (va_list* ap) (/* 创建点对象,并设置其属性*/
point_t* p_point;
if ( (p_point= (point_t*)malloc (sizeof (point_t)) ) ==NULL) returnNULL;
p_point->common, type = point; p_point->common, destroy = destroyPoint;
p_point->common.draw = drawPoint;
p_point->x = va_arg(*ap, int); /* 设置点的横坐标*/
p_point->y = va_arg(*ap, int); /* 设置点的纵坐标*/
return (shape_t*)p_ooint; /*返回点对象指针*/
}
typedef struct { /*定义圆类型*/
shape_t common;
point_t 4center; /*圆心点*/
int radius; /*圆半径*/
} circle_t;
void destroyCircle(circle_t* this){
free((1)); free(this); printf("Circle destoryed!\n");
}
void drawCircle(circle_t* this) {
print f ("C (");
(2).draw(this->center); /*绘制圆心*/
printf(",%d) ", this->radius);
}
shape_t* createCircle(va_list4 ap) { /*创建一个圆,并设置其属性*/
circle_t4 p circle;
if ((p_circle = (circle_t4)malloc (sizeof (circle_t)) ) ==NULL ) return NULL;
p_circle->common.type = circle; p_circle->common.destroy = destroy
Circle;
p_circle->common.draw = drawCircle;
(3) = createPoint(ap); /* 设置圆心*/
p_circle->radius = va_arg(*ap, int); /* 设置圆半径*/
return p_circle;
}
shape_t* createShape(shape_type st, "') { /* 创建某一种具体的图形*/
va_list ap; /*可变参数列表*/
&nbs
第7题:
A.Smooth Point(平滑曲线点)
B.Corner Point(角点)
C.Compounded Point(复合式控制点)
D.Vector Point(向量式控制点)
第8题:
若点集 E 的全部聚点都属于 E , 则称 E 为( )集.
第9题:
如何创建半曲线锚点()
第10题:
使用CV曲线工具创建NURBS曲线,下列说法正确的是()。