首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
In looking at the class structure of an entire system, we may find that its inheritance (1) is either wide and shallow, narrow a
In looking at the class structure of an entire system, we may find that its inheritance (1) is either wide and shallow, narrow a
admin
2009-09-04
85
问题
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.
选项
A、distinction
B、level
C、grade
D、hierarchy
答案
D
解析
转载请注明原文地址:https://kaotiyun.com/show/4rxZ777K
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
TCP通过建立连接为用户提供可靠传输,与数据链路层的连接建立不同,TCP要经过(58)才能确定一个连接,这是因为(59)。TCP采用的差错控制也是超时重发技术,超时时间的设置采用—(60)策略,以便适应互联网的特性。超时时间设置根据的是(61)。TCP的拥
设某单位路由器建立了以下的路由表,若收到分组的目的IP地址为128.96.37.151,则转发的端口是(63),若收到分组的目的IP是128.96.35.151,则转发的端口是(64),若该路由器是该单位与Internet连接的路由器,则该单位分得的IP地
系统测试是将软件系统与硬件、外设和网络等其他因素结合,对整个软件系统进行测试。(12)不是系统测试的内容。
Networkscanbeinterconnectedbydifferentdevices.Inthephysicallayer,networkscanbeconnectedby(66)orHubs,whichjust
CMM(软件能力成熟度模型)描述和分析了软件过程能力的发展与改进的程度,确立了一个软件过程成熟程度的分级标准。在初始级,软件过程定义几乎处于无章可循的状态,软件产品的成功往往依赖于个人的努力和机遇;在(44),已建立了基本的项目管理过程,可对成本、进度和功
Frame Relay is simplified form of(51), similar in principle to(52), in which synchronous, frames of data are routed to different
有关UDP协议说法不正确的是(25)。
某一非确定性有限自动机(NFA)的状态转换图如下图所示,与该NFA等价的正规式是(28),与该NFA等价的DFA是(29)。
VirtualizationisanapproachtoITthatpoolsandshares(1)sothatutilizationisoptimizedandsuppliesautomaticallymeetd
随机试题
下列哪些是QSAR常用的参数
关于低钾血症的叙述,错误的是
编制监理规划,应依据()等。
钢筋混凝土梁正截面()破坏为塑性破坏。
我国对企业投资的管理推行企业投资项目核准制始于()年。
甲公司20×8年12月发生下列业务:(1)接受母公司现金捐赠100万元;(2)计提固定资产减值准备10万元;(3)因持有交易性金融资产确认公允价值变动收益15万元;(4)盈余公积转增资本100万元;(5)发放股票股利共计200万股,每股面值1元。
王霸字元伯,颍川颍阳人也。汉兵起,光武过颍阳,遂从击破王寻、王邑于昆阳。及光武为大司马,以霸为功曹令史,从度河北。宾客从霸者数十人,稍稍引去。光武谓霸曰:“颍川从我者皆逝,而子独留。努力!疾风知劲草。”及王郎起,光武在蓟,郎移檄购光武。光武即南驰至下曲阳。
两型社会是指“资源节约型”和“环境友好型”社会。()
以下关于C语言的叙述中正确的是()。
Thewomencarryingbabiescomeinfirst,______?
最新回复
(
0
)