试题与答案

下列关于派生类的描述中,错误的是( )。A.一个派生类可以作为另一个派生类的基类

题型:单项选择题

题目:

下列关于派生类的描述中,错误的是( )。

A.一个派生类可以作为另一个派生类的基类

B.派生类至少有一个基类

C.派生类的成员除了它自己的成员外,还包含了它的基类的成员

D.派生类中继承的基类成员的访问权限到派生类中保持不变

答案:

参考答案:D

解析: 基类与派生类的关系如下:
①基类是对派生类的抽象,派生类是对基类的具体化。基类抽取了它的派生类的公共特征,而派生类通过增加信息将抽象的基类变为某种有用的类型,派生类是基类定义的延续。
②派生类是基类的组合。
③公有派生类的对象可以作为基类的对象处理。
由此可知选项A、B和C都是正确的。而在继承中,采用不同的继承方式,将限制派生类对基类成员的访问。所以选项D是错误的。

试题推荐
题型:单项选择题

如果人民法院对某犯罪分子判处3年有期徒刑的同时,判决剥夺政治权利3年,则( )。

A.剥夺政治权利的刑期自羁押之日起计算

B.剥夺政治权利的刑期自宣判之日起计算

C.剥夺政治权利的刑期自有期徒刑执行完毕之日起计算,有期徒刑执行期间该犯罪分子仍享有政治权利

D.剥夺政治权利的刑期自有期徒刑执行完毕之日起计算,有期徒刑执行期间该犯罪分子当然不享有政治权利

查看答案
题型:阅读理解

NEW YORK CITY?A hurricane warning has been given for New York City.Forecasters say Hurricane Irene could cause widespread flooding, power failure and billions of dollars in damage.About 65 million Americans live in Hurricane Irene’s projected path —many of whom have been evacuated

In New York City, Mayor Michael Bloomberg has ordered the city’s first-ever evacuation. Roughly 250,000 people have been told to leave their homes in low-lying areas, including the Wall Street financial district.

WASHINGTON D.C.—On Aug.24, 2011, Apple announced that Mr.Steve Jobs, who has battled cancer for several years, was stepping down as the CEO but would serve as chairman.

In January, he had announced that he was taking a medical leave of absence from Apple.In announcing his leave, he turned daily oversight of the company over to the chief operating officer, Timothy D.Cook, and it was Mr.Cook whom Apple named to succeed him as the next CEO of the company.

TRIPOLI—Opposition forces in Libya say they control more than 90 percent of the country.It is still not clear where Moammar Gadhafi is.The opposition has offered more than 1,600,000 dollars for his capture (逮捕).The head of the opposition forces said his group supports a decision by local businessmen to provide the money in an effort to speed up the capture.Earlier Wednesday, government forces fired onto the former headquarters (总部) of Mr.Gadhafi, which is now controlled by opposition forces.Heavy fighting also continued near Tripoli’s airport and in a town of Zuara.

小题1:The underlined word "evacuated" probably means ________.

A.sent away to safer places

B.gathered around to higher positions

C.flooded off to lower reaches

D.left behind to dangerous situations小题2:Who has been appointed as the new CEO of Apple?

A.Steve Jobs.

B.Michael Bloomberg.

C.Moammar Gadhafi.

D.Timothy小题3:From the news above, we know that in Libya _______.

A.the local businessmen have offered money to catch hold of Gadhafi

B.the opposition forces suffered a thorough defeat near Tripoli’s airport

C.the government forces are defending the headquarters of Mr.Gadhafi

D.the town ofZuara is the place where Moammar Gadhafi probably hides

查看答案
微信公众账号搜索答案