问题 单项选择题

下面关于类、对象、属性和方法的叙述中,错误的是( )。

A) 类是对一类相似对象的描述,这些对象具有相同种类的属性和方法
B) 属性用于描述对象的状态,方法用于表示对象的行为
C) 基于同一个类产生的两个对象可以分别设置自己的属性值
D) 通过执行不同对象的同名方法,其结果必然是相同的

答案

参考答案:D

解析: 方法是描述对象行为的过程,是对当某个对象接受了消息后所采取的一系列操作的过程。方法尽管定义在类中,但执行方法的主体是对象。同一个方法,如果由不同的对象去执行,一般会产生不同的结果。

判断题
单项选择题

Attempts to understand the relationship between social behavior and health have their origin in history. Dubos (1969) suggested that primitive humans were closer to the animals (1) they, too, relied’upon their instincts to stay healthy. Yet some primitive humans (2) a cause and effect relationship between doing certain things and alleviating (3) of a disease or (4) the condition of a wound. (5) there was so much that primitive humans did not (6) the functioning of the body, magic became an integral component ofthe beliefs about the causes and cures of heath (7) Therefore it is not (8) that early humans thought that illness was caused (9) evil spirit. Primitive medicines made from vegetables or animals were invariably used in combination with some form of ritual to (10) harmful spirit from a diseased body.

One of the. earliest (11) in the Western world to formulate principles of health care based upon rational thought and (12) of supernatural phenomena is found in the work of the Greek physician Hippocrates. The writing (13) to him has provided a number of principles underiying modern medical practice. One of his most famous (14) , the Hippocratic Oath, is the foundation of contemporary medical ethics.

Hippocrates also argued that medical knowledge should be derived from a (15) of the natural science and the logic of cause and effect relationships. In this (16) thesis, On Air, Water, and Places, Hippocrates pointed out that human well-being is (17) by the totality of environmental (18) : living habits or lifestyle, climate, geography of the land, and the quality of air, and food. (19) enough, concerns about our health and the quality of air, water, and places are (20) very much written in twentieth century.

17()

A.impressed

B.surpassed

C.influenced

D.regarded