首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
69
问题
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
软件设计师上午基础知识考试
软考中级
相关试题推荐
若信号带宽为40Hz,理想信道可以达到的最大码元速率为(17)。若码元可以取8种离散值,则一个码元携带的信息量为(18)比特,此时,理想信道传输信号带宽为40Hz的数据速率为(19)。
FTP是基于(39)实现的文件传输协议,使用此协议进行文件传输时,FTP客户和服务器之间建立的连接是(40)。
(12)是关于质量管理体系的一系列标准,有助于企业交付符合用户质量要求的产品。自标准实施之日起,至标准复审重新确认、修订或废止的时间,称为标准的有效期,我国在国家标准管理办法中规定,国家标准的有效期一般为(13)年。我国著作权法中对公民作品的发表权
阅读以下有关网络设计的叙述,分析网络结构,回答下面问题。某公司从20世纪70年代中期开始使用PC机,曾使用NOVELL网络,现在要着手组建企业网络。经过需求分析和论证,设计出如下网络方案。
设计布线时,需要考虑哪些主要因素?在工作区内,信息插座的安装一般在什么位置?
04B/5B编码是一种两级编码方案,首先要把数据变成(13)编码,再把4位分为一组的代码变换成5单位的代码。这种编码的效率是()。
TheSimpleNetworkManagementProtocol(SNMP)isan(71)protocolthatfacilitatestheexchangeofmanagementinformationbetween(7
TheBorderGatewayProtocol(BGP)isaninterautonomoussystem(6)protocol.TheprimaryfunctionofaBGPspeakingsystemistoex
如图3-1所示为一确定有限自动机(DFA)的状态转换图,与该自动机等价的正规表达式是(1),图中的(2)是可以合并的状态。
某一确定有限自动机(DFA)的状态转换图如下图所示,该DFA接受的字符串集是(28),与之等价的正规式是(29)。
随机试题
马克思主义者认为,教育是一种()。
升麻、柴胡在补中益气汤中是
下列哪一种脂肪酸是合成前列腺素的前体
70号A级沥青的RTFOT试验结果如下表,请依表回答下列问题:关于沥青老化正确的解释是()。
政府对施工质量实施监督管理的主要手段是()。
乙企业应交的增值税为()元。甲企业收回委托加工材料的入账成本为()元。
甲公司2010年年末的流动资产总额为1200万元,流动负债总额为800万元,股东权益20000万元,负债总额30800万元;2010年的销售收入为5000万元。预计2011年销售收入增长率为25%。为此需要增加净经营长期资产300万元,根据有关情况分析,企
每股收益
为适应改革开放和社会主义现代化建设的需要,1985年中共中央颁发《关于教育体制改革的决定》,下放教育管理权,其中高等教育实行三级办学体制,这三级是指
______是C++语言程序的人口。
最新回复
(
0
)