题目内容 (请给出正确答案)
[主观题]

接口Animal 定义如下:public interface Animal{void Move();}则下列抽象类的定义中,哪些是不合法的?()

A.abstract class Cat: Animal

{

abstract public void Move();

}

B.abstract class Cat: Animal

{

virtual public void Move(){Console.Write(Console.Write("Move!");)}

}

C.abstract class Cat: Animal

{

public void Move(){Console.Write(Console.Write("Move!");)};

}

D.abstract class Cat: Animal

{

public void Eat(){Console.Write(Console.Write("Eat!");)};

}

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“接口Animal 定义如下:public interface…”相关的问题

第1题

有一个接口定义如下,下列选项中实现了该接口并且不是抽象的是 interface A { int method1 (int i); int method2 (int j); }

A.class B implements A { int method1(){} int method2(){} }

B.class B { int method1(int i){} int method2(int j){} }

C.class B implements A { int method1(int 1){} int method2(int j){} }

D.class B extends A { int method1(int i){} int method2(int j){} }

点击查看答案

第2题

有一个接口定义如下,下列选项中实现了该接口并且不是抽象的是( )。

A.interface A { int methodl(int i); int method2(int j); } classBimplementsA

B.classB { {

C.class B implements A

D.class B extends A { {

点击查看答案

第3题

有一个接口定义如下,下列选项中实现了该接口并且不是抽象的是( )。

A.interface A { int methodl(int i); int method2(int j); } classBimplementsA

B.classB { {

C.class B implements A

D.class B extends A { {

点击查看答案

第4题

下面是类Shape的定义: class Shape{ public: virtual void Draw()=0; } 下列关于Shape类的描述中,正确的是( )。

A.类Shape是虚基类

B.类Shape是抽象类

C.类Shape中的Draw函数声明有误

D.语句“Shape s;”能够建立Shape的一个对象s

点击查看答案

第5题

下面是类Shape的定义:

classShape{

public:

virtualvoidDraw( )=0;

}

下列关于Shape类的描述中,正确的是( )。

A.类Shape是虚基类

B.类Shape是抽象类

C.类Shape中的Draw函数声明有误

D.语句“ShapeS;”能够建立Shape的一个对象S

点击查看答案

第6题

下列类定义中属于合法的抽象类的定义的是()
A、abstract Animal{abstract void growl()}

B、class abstract Animal{abstract void growl()}

C、abstract class Animal{abstract void growl()}

D、abstract class Animal{ abstract void growl(){System.out.println("growl")};}

点击查看答案

第7题

下面是类Shape的定义: classShape{ public: virtualvoidDraw( )=0; } 下列关于Shape类的描述中,正确的是( )。

A.类Shape是虚基类

B.类Shape是抽象类

C.类Shape中的Draw函数声明有误

D.语句“ShapeS;”能够建立Shape的一个对象S

点击查看答案

第8题

( 32 )下面是类 Shape 的定义:

class Shape{

public:

virtual void Draw()=0;

};

下列关于 Shape 类的描述中,正确的是

A )类 Shape 是虚基类

B )类 Shape 是抽象类

C )类 Shape 中的 Draw 函数声明有误

D )语句 “ Shape s; ” 能够建立 Shape 的一个对象 s

点击查看答案

第9题

有一个接口定义如下: interface A { int method1(int i); int method2(int j);}那么下面各项中实现了该接口并且不是抽象类的是( )。

A.class B implements A { intmethod1(){} intmethod2(){} }

B.calss B { int method1(int i){) int method2(int j){} }

C.class B implementsA { int method1(int i){} int method2(int j){} }

D.class B extendsA { int method1(int i){} int method2(int j){} }

点击查看答案

第10题

有一个接口定义如下: interface A { int method1(int i); int method2(int j); } 那么下面各项中实现了该接口并且不是抽象类的是( )。

A.class B implements A { int method1(){} int method2(){} }

B.class B { int method1(int i){} int method2(int j){} }

C.class B implements A { int method1(int i){} int method2(int j){} }

D.class B extends A { int method1(int i){} int method2(int j){} }

点击查看答案
热门考试 全部 >
相关试卷 全部 >
账号:
你好,尊敬的上学吧用户
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,
如果您知道正确答案,欢迎您来纠错

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
上学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
上学吧
点击打开微信