问题 单项选择题

在面向对象技术中,类属是一种 (68) 机制。一个类属类是关于一组类的一个特性抽象,它强调的是这些类的成员特征中与 (69) 的那些部分,而用变元来表示与 (70) 的那些部分。

70()

A.具体对象无关

B.具体类型无关

C.具体对象相关

D.具体类型相关

答案

参考答案:D

解析:

类属类(Generic Class)仅描述了适用于一组类型的通用样板,由于其中所处理对象的数据类型尚未确定,因而程序员不可用类属类直接创建对象实例,即一个类属类并不是一种真正的类类型。

类属类必须经过实例化后才能成为可创建对象实例的类类型。类属类的实例化是指用某一数据类型替代类属类的类型参数。类属类定义中给出的类型参数称为形式类属参数,类属类实例化时给出的类型参数称为实际类属参数。如果类属类实例化的实际类属参数可以是任何类型,那么这种类属类称为无约束类属类。然而在某些情况下,类属类可能要求实际类属参数必须具有某些特殊的性质,以使得在类属类中可应用某些特殊操作,这种类属类称为受约束类属类。

阅读理解

The largest earthquake ( magnitude里氏 9.5) of the 20th century happened on May 22, 1960 off the coast of South Central Chile.

It generated(生成) one of the most destructive Pacific-wide tsunamis(海啸). Near the generating area, both the earthquake and the tsunami were very much destructive, particularly in the coastal area from Concepcion to the south end of Isla(岛) Chiloe. The largest tsunami damage occurred at Isla Chiloe---the coastal area closest to the epicenter(震中). Huge tsunami waves measuring as high as 25 meters arrived within 10 to 15 minutes after the earthquake, killing at least two hundred people, sinking all the boats, and flooding half a kilometer inland.

There was large damage and loss of life at Concepcion, Chile's top industrial city. Near the city of Valdivia, the earthquake and following aftershocks generated landslides which killed 18 people. At the port city of Valparaiso, a city of 200,000, many buildings collapsed. A total of 130,000 houses were destroyed --- one in every three in the earthquake zone and nearly 2,000,000 people were left homeless.

Total damage losses, including to agriculture and to industry, were estimated(估计) to be over a half billion dollars . The total number of death related with both the tsunami and the earthquake was never found accurately for the region. Estimates of deaths reached between 490 to 5,7002 with no distinction(差别) as to how many deaths were caused by the earthquake and how many were caused by the tsunami. However, it is believed that most of the deaths in Chile were caused by the tsunami.                                                                                       

小题1: Where did the largest tsunami damage occurred?

A.Concepcion

B.Isla Chiloe

C.Valdivia

D.Valparaiso小题2:What can we learn about the tsunami waves generated by the earthquake?

A.The tsunami waves as high as 25 meters arrived immediately after the earthquake.

B.The tsunami waves killed 200 people and sank all boats.

C.The tsunami waves were very destructive.

D.The tsunami waves flooded half of the inland.小题3:What is generally thought the main cause of deaths in Chile?

A.landslides

B.the tsunami

C.aftershocks

D.the magnitude 9.5 earthquake小题4:What is the total number of deaths in the earthquake?

A.2,000,000

B.between 490 to 57,002

C.200,000

D.it was hard to know.小题5:What does the underlined word “collapsed” probably mean ?

A.was destroyed

B.caught fire

C.was flooded

D.sank

单项选择题 案例分析题