题目内容

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. (2)

A. free-standing
B. alone
C. only
D. lonely

查看答案
更多问题

用于支气管哮喘、喘息性支气管炎

A. 盐酸可乐定
B. 盐酸克仑特罗
C. 盐酸多巴胺
D. 盐酸麻黄碱
E. 硫酸沙丁胺醇

具有二甲氨基结构

A. 氟哌啶醇
B. 三唑仑
C. 盐酸氯丙嗪
D. 盐酸阿米替林

乙醇溶液遇硝酸银试液生成白色沉淀

A. 雌二醇
B. 炔雌醇
C. 已烯雌酚
D. 黄体酮

影响药物吸收的生理因素

A. 首过效应
B. 肾小球过滤
C. 血脑屏障
D. 胃排空与胃肠蠕动
E. 药物在胃肠道中的稳定性

答案查题题库