问题 选择题

下列方法不能用于鉴别蒸馏水和硬水的是(  )

A.加热蒸发

B.加肥皂水

C.测导电性

D.观察颜色

答案

A、加热蒸发,无变化的是蒸馏水,有白色固体的是硬水,正确但不符合题意.故选项错误;

B、加肥皂水,泡沫多的是软水,泡沫少的是硬水,正确但不符合题意.故选项错误;

C、蒸馏水不导电,正确但不符合题意.故选项错误;

D、蒸馏水和硬水都无色,符合题意,故选项正确;

故选D.

单项选择题

In looking at the class structure of an entire system, we may find that its inheritance (1) is either wide and shallow, narrow and deep, or balanced. Class structures that are wide and shallow usually represent forests of (2) classes that can be mixed and matched. Class structures that are narrow and deep represent trees of classes that are related by a common ancestor. There are advantages and disadvantages to each approach. Forests of classes are more loosely (3) , but they may not exploit all the commonality that exists. Trees of classes exploit this commonality, so that individual classes are smaller than in forests. However, to understand a particular class, it is usually necessary to understand the meaning of all the classes it inherits from or uses. The proper shape of a class structure is highly problem-dependent.
We must make similar trade-offs among inheritance, aggregation, and using relation- ships. For example, should the class Car inherit, contain, or use the classes named Engine and Wheel In this case, we suggest that an (4) relationship is more appropriate than inheritance relationship. Meyer states that between the class A and B," (5) is appropriate if every instance of B may also be viewed as an instance of A. The client relationship is appropriate when every instance of B simply possesses one or more attributes of A". From another perspective, if the behavior of an object is more than the sum of its individual parts, then creating an aggregation relationship rather than an inheritance relationship between the appropriate classes is probably superior.

(5)

A.aggregation

B.inheritance

C.association

D.using

单项选择题