单选题指令Circle(1000,1000),500,8,-6,-3将绘制()。A圆弧B扇形C圆D椭圆
单选题
指令Circle(1000,1000),500,8,-6,-3将绘制()。
A
圆弧
B
扇形
C
圆
D
椭圆
参考解析
解析:
暂无解析
相关考题:
使用VC6打开考生文件夹下的工程test7_3,此工程包含一个源程序文件test7_3.cpp,其中含有一个类Circle的定义,但该类的定义并不完整。请按要求完成下列操作,将类Circle的定义补充完整。(1)为类Circle增加一个构造函数,该函数有一个参数,并在构造时将该参数值赋给成员radius。将该函数实现为一个非内联函数,并且使用参数列表的方式将类成员赋值。请在注释“//**1**”之后添加适当的语句。(2)为类Circle增加一个成员函数print(),使得可以输出有关圆的信息,比如下列程序Circle c;c.SetRadius(5);c.Print();将输出:The circle has radius of 5!请在注释“//**2**”之后添加适当的语句。(3)完成友元函数void CompareR(Circle *cl,Circle*c2)的定义,在屏幕中输出c1与c2比较radius大小结果,要求使用 if-else结构完成。请在注释“//**3**”之后添加适当的语句。输出结果如下;The circle has radus of 5!The circle has radius of 10!c1<c2注意:除在指定位置添加语句之外,请不要改动程序中的其他内容。源程序文件test7_3.cpp清单如下:include<iostream.h>class Circle{public:Circle():radius(5){}//**1**void SetRadius(int r) {radius=r; }int GetRadius() {return radius; }//**2**friend void CompareR(Circle *c1,Circle*C2);private:int radius;};void CompareR(Circle *c1,Circle *C2){//**3**cout<<"c1c2"<<endl;elseif((c1->GetRadius())==(c2->GetRadius()))cout<<"c1=c2"<<endl;elseif((c1->GetRadius())<(c2->GetRadius()))cout<<"c1<c2"<<endl;}void main(){Circle c1;c1.SetRadius(5);C1.Print();Circle c2(10);c2.Print();CompareR(c1,c2);}
描述以(1000,1000)为圆心、以400为半径画1/4圆弧的语句,以下正确的是( ) 。A、Circle(1000,1000),400,0,3.1415926/2B、Circle(1000,1000),,400,0,3.1415926/2C、Circle(1000,1000),400,,0,3.1415926/2D、Circle(1000,1000),400,,0,90
试题六(共15分)阅读以下说明、图和Java代码,填补Java代码中的空缺(1)~(6),将解答写在答题纸的对应栏内。【说明】已知对某几何图形绘制工具进行类建模的结果如图6.1所示,其中Shape为抽象(abstract)类,表示通用图形,Box(矩形)、Ellipse(椭圆)和Line(线条)继承(extends)了Shape类,其中,Circle表示圆(即特殊的椭圆)。下面的Java代码用于实现图 6-1所给出的设计思路,将其空缺处填充完整并编译运行,输出结果为:EllipseCircleEllipseCE【Java代码】(1) class Shape{public Shape(String name){this.name= name;}(2) void paint();String getName(){retum this.name;}final String name;};//Box 和Line类似下面 Ellipse,其代码略class Ellipse (3) {public Ellipse(String name){super(name);System.out.println("Ellipse");}Void paintO{∥绘制现状示意代码System.out.println(getName0);}};class Circle (4) {public Circle(String name){super(name);System.out.println("Circle");}};class Diagram{private Shape shapes[]= new Shape[2];public void drawAShape(Shape shape){shape.paint();}void erase A Shape(Shape shape){∥删除形状,代码略}void drawShapes(){shapes*0+= new Circle("C”);shapes[l]= new Ellipse("E");for (int i=O; i2;++i) {drawAShap(shapes[i]);//绘制形状}}void close(){for (int i=0;i2; ++1) { []关闭图,删除所绘制图形(5) ;}}public static void main(String[] args){Diagram diagram= (6) ;diagram.drawShapes();diagram.close();}}
阅读下列说明和C++代码,填写程序中的空(1)~(6),将解答写入答题纸的对应栏内。 【说明】以下C++代码实现一个简单绘图工具,绘制不同形状以及不同颜色的图形。部分类及其关系如图6-1所示。【C++代码】#include #include using namespace std;class DrawCircle { //绘制圆形,抽象类 public: (1) ;//定义参数为 int radius, int x, int y virtual~DrawCircle() { }}; class RedCircle:public DrawCircle { //绘制红色圆形 public: void drawCircle(int radius, 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,int y,int radius,DrawCircle *drawCircle) (3) { this->x = x; this->y = y; this->radius = radius; } public: void draw() { drawCircle -> (4) ; }}; int main(){ Shape *redCircle=new Circle(100,100,10, (5) );//绘制红色圆形 Shape *greenCircle=new Circle(100,100,10, (6) );//绘制绿色圆形 redCircle ->draw(); greenCircle ->draw(); return 0;}
阅读以下说明和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();? ?}}
当对DrawWidth进行设置后,将影响()。A、Line、Circle、Pset和Line、Shape控件B、Line、Circle、PsetC、Line、Circle、Poine方法D、Line、Shape控件
关于圆和椭圆的绘制说法正确的是()A、都是用Circle方法,参数选择也是一样的B、Circle(60,50),10表示在(60,50)处绘制一个半径为10的椭圆C、Circle(60,50),10....0.6在窗体上绘制垂直方向上的椭圆D、Circle(60,50),10....1.5在窗体上绘制垂直方向上的椭圆
()可以在窗体上绘制一个半径为1000的圆。A、Form1.Circle (1000, 1000), 1000B、Line (1000, 1000)-(2000, 2000)C、Point 1000,1000D、Pset 1000,1000
单选题A circle with center A has its center at (6, -2) and a radius of 4. Which of the following is the equation of a line tangent to the circle with center A ?Ay=3x+2By=2x+1Cy=-x+5Dy=-2Ey=-6
单选题指令“Circle(1000,1000),500,,-6,-3”将绘制()。A画圆B椭圆C扇形D圆弧