publicabstractclassShape{intx;inty;publicabstractvoiddraw();publicvoidsetAnchor(intx,inty){this.x=x;this.y=y;}}andaclassCirclethatextendsandfullyimplementstheShapeclass.Whichiscorrect?() A.Shapes=newShape();s.setAnchor(10,10);s.draw();B.Circlec=newShape();c.setAnchor(10,10);c.draw();C.Shapes=newCircle();s.setAnchor(10,10);s.draw();D.Shapes=newCircle();s-setAnchor(10,10);s-draw();E.Circlec=newCircle();c.Shape.setAnchor(10,10);c.Shape.draw();
publicabstractclassShape{intx;inty;publicabstractvoiddraw();publicvoidsetAnchor(intx,inty){this.x=x;this.y=y;}}andaclassCirclethatextendsandfullyimplementstheShapeclass.Whichiscorrect?()
A.Shapes=newShape();s.setAnchor(10,10);s.draw();
B.Circlec=newShape();c.setAnchor(10,10);c.draw();
C.Shapes=newCircle();s.setAnchor(10,10);s.draw();
D.Shapes=newCircle();s->setAnchor(10,10);s->draw();
E.Circlec=newCircle();c.Shape.setAnchor(10,10);c.Shape.draw();
相关考题:
publicabstractclassShape{privateintx;privateinty;publicabstractvoiddraw();publicvoidsetAnchor(intx,inty){this.x=x;this.y=y;}}WhichtwoclassesusetheShapeclasscorrectly?() A.publicclassCircleimplementsShape{privateintradius;}B.publicabstractclassCircleextendsShape{privateintradius;}C.publicclassCircleextendsShape{privateintradius;publicvoiddraw();}D.publicabstractclassCircleimplementsShape{privateintradius;publicvoiddraw();}E.publicclassCircleextendsShape{privateintradius;publicvoiddraw(){/*codehere*/}}F.publicabstractclassCircleimplementsShape{privateintradius;publicvoiddraw(){/codehere*/}}
下列函数定义中,会出现编译错误的是 ______。A.max(int x,int y,int *z) { *z=x>y? x:y;}B.int max(int x,y) {int z; z=x>y? x;y; return z; }C.max(int x,int y) { int z; z=x>y? x:y; return(z); }D.int max(int x,int y) { return(x>y?x:y);}
下列函数定义中,会出现编译错误的是A.max(int x,int y,int *z) { *z=xy ? x:y; }B.int max(int x,y) { int z; z=x>y ? x:y; return z; }C.max(int x,int y) { int z; z=xy?x:y; return(z); }D.int max(int x,int y) { return(x>y?x:y); }
下列函数定义中,会出现编译错误的是______。A.max(int x,int y,int *z) { *z=x>y?x:y; } z=x>y?x:y;B.int max(int x,y) {int z; return z; }C.max(int x,int y) { int z; z=x>y?x:y; return (z);}D.int max(int x,int y) { return x>y?x:y;}
下列函数定义中,会出现编译错误的是A.max(int x,int y,int*z) {*z=x>y?xy;}B.int max(int x,y) {int z; z=x>y?xy; return z; }C.max(int x,int y) {int z; z=x>y?xy;return(z); }D.int max(int x,int y) { return(x>y?xy);}
下列函数定义中,会出现编译错误的是( )。A.max(int x,int y,int *z) { *z=x>y?x:y; }B.int max(int x,y) { int z; z=x>y?x:y; return z; }C.max(int x,int y) { int z; z=x>y? x:y; return(z); }D.int max(int x,int y) { return(x>y? x:y); }
下列函数定义中,会出现编译错误的是______。A.max(int x,int y,int*z)B.int max(int x,y) { *z=x>y?x:y;} {int z; z=x>y?X:y; return z;}C.max(int x,int y)D.int max(int x,int y) {int z; {return x>y?x:y;} z=x>y?x:y; return(z);}
下列函数定义中,会出现编译错误的是_____。A.max(int x,int y,int *z) { *z=x>y?x:y; } z=x>y?x:y; return z;}B.int max(int x,y) {int z;C.max(int x,int y) {int z; z=x>y?x:y; return(z);}D.int max(int x,int y) {return x>y?x:y;}
下列函数定义中,会出现编译错误的是______。A.max(int x, int y, int *z) { *z=x>y ? x:y; } z=x>y ? x:y;B.int max(int x,y) {int z; return z; }C.max(int x,int y) {int z; z=x>y? x:y; return(z);}D.int max(int x, int y) {return x>y ? x:y;}