网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

当对Draw Width进行设置后,将影响( )。

A.Line、Circle、Pset方法

B.Line、Shape控件

C.Line、Circle、Point方法

D.Line、Circle、Pset方法和Line、Shape控件


参考答案

更多 “ 当对Draw Width进行设置后,将影响( )。A.Line、Circle、Pset方法B.Line、Shape控件C.Line、Circle、Point方法D.Line、Circle、Pset方法和Line、Shape控件 ” 相关考题
考题 下列( ) 是用来画圆、圆弧及椭圆的。A、Circle方法B、Pset方法C、Line属性D、Point属性

考题 阅读以下说明和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 = destroyCircle;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

考题 阅读以下说明和Java程序,填写程序中的空(1)~(6),将解答写入答题纸的对应栏内。 【说明】 以下Java代码实现一个简单绘图工具,绘制不同形状以及不同颜色的图形。部分接口、类及其关系如图5-1所示。 【Java代码】 interface?DrawCircle?{? //绘制圆形 public(1) ;}class?RedCircle?implements?DrawCircle?{? ?//绘制红色圆形???????public?void?drawCircle(int?radius,intx,?int?y)??{????????????System.out.println("Drawing?Circle[red,radius:"?+?radius?+",x:"?+?x?+?",y:"?+y+?"]");???????}}class?GreenCircle?implements?DrawCircle?{????//绘制绿色圆形??????public?void?drawCircle(int?radius,?int?x,int?y)?{???????????System.out.println("Drawing?Circle[green,radius:"?+radius+",x:?"?+x+?",y:?"?+y+?"]");??????}}abstract?class?Shape?{????//形状? protected? ? (2)???;? ? public?Shape(DrawCircle?drawCircle)?{? ?this.drawCircle=?drawCircle;? ? ? public?abstract?void?draw();}class?Circle?extends?Shape?{? //圆形? ?private?int?x,y,radius;? public?Circle(int?x,int?y,intradius,DrawCircle?drawCircle)?{? ?(3)???;? this.x?=?x;? ? ? this.y?=?y;? ?this.radius?=radius;? }? ? ?public?void?draw()?{? ? drawCircle.? ?(4)? ?;? ? ? }}public?class?DrawCircleMain?{? public?static?void?main(String[]?args)?{? Shape?redCircle=new?Circle(?100,100,10,? (5) );//绘制红色圆形? Shape?greenCircle=new?Circle(200,200,10,(6) );//绘制绿色圆形? ?redCircle.draw(); greenCircle.draw();? ?}}

考题 阅读下列说明和C++代码,填写程序中的空(1)~(6),将解答写入答题纸的对应栏内。 【说明】 以下C++代码实现一个简单绘图工具,绘制不同形状以及不同颜色的图形。部分类及其关系如图6-1所示。 【C++代码】 #include?#include?using?namespace?std;class?DrawCircle?{??????//绘制圆形,抽象类? ? ? public: (1);//定义参数为?int?radius,?int?x,?inty? ?virtual~DrawCircle()?{?}};class?RedCircle:public?DrawCircle?{????//绘制红色圆形? ? ? ? public: void?drawCircle(intradius,?int?x,?int?y)?{cout??drawCircle?=?drawCircle;? }? ?virtual~shape()?{?}? public:? ?virtual?void?draw()?=?0;};class?Circle:public?Shape?{????//圆形? ? private:? ? ?int?x,y,radius;? ? public:? Circle(int?x,inty,int?radius,DrawCircle?*drawCircle)? (3)? {? this->x?=?x;? ?this->y?=?y;? ? this->radius?=?radius; }? ? ? public:? void?draw(){? drawCircle?-> (4); }};int?main(){Shape?*redCirclenew?Circle(100,100,10,????(5)????);//绘制红色圆形? Shape?*greenCircle=new?Circle(100,100,10, (6)??);//绘制绿色圆形redCircle >draw();? ?greenCircle?->draw();? ?return?0;}

考题 有基类SHAPE,派生类CIRCLE,声明如下变量: SHAPE shape1,*p1; CIRCLE circle1,*q1; 下列哪些项是“派生类对象替换基类对象”。A.p1=circle1;B.q1=shape1;C.shape1=circle1;D.circle1=shape1;

考题 以下叙述错误的是()。A.Pset方法如果没有颜色参数,则用容器对象的背景色画点B.Circle方法用于画圆、椭圆、圆弧和扇形C.Line方法用于画直线和矩形D.Point方法用于返回指定点的RGB颜色

考题 9、下列叙述错误的是()。A.Pset方法用于绘制点B.Circle方法用于画圆、椭圆、圆弧和扇形C.Line方法用于画直线和矩形D.Point方法用于绘制有颜色的点

考题 下列叙述错误的是()。A.Pset方法用于绘制点B.Circle方法用于画圆、椭圆、圆弧和扇形C.Line方法用于画直线和矩形D.Point方法用于绘制有颜色的点

考题 下列叙述中,错误的是()。A.Pset方法用于绘制点,利用它可画任意曲线B.Circle方法用于画圆、椭圆、圆弧和扇形C.Line方法只能用于画直线D.Point方法用于返回指定点的RGB颜色