首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
83
问题
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://www.kaotiyun.com/show/4rxZ777K
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
项目管理工具中,将网络方法用于工作计划安排的评审和检查的是(13)。
以RPM方式安装的Apache服务器,Apache的主配置文件是(18)。如果允许以“http://www.wg2006.com.cn/wg_wg.html”方式访问用户的个人主页,必须通过(19)指令设置个人主页文档所在的目录。
Microsoft’sCOMisasoftwarearchitecturethatallowsapplicationstobebuiltfrombinarysoftwarecomponents.COMistheunde
计算机指令系统通常采用多种确定操作数的方式。当操作数直接给出时,这种寻址方式叫作(8),在这种方式下,操作数直接包含在指令中;当操作数的地址由某个指定的变址寄存器的内容与位移量相加得到时,叫作(9);如果操作数的地址是主存中与该指令地址无关的存储单元的内容
FDDI(光纤分布式数据接口)的基本编码方法是(168),在此基础上采用(169)编码,编码效率提高到(170)。
阅读下列程序说明和C代码,填入(n)处。【说明】幼儿园有n(<20)个孩子围成一圈分糖果。老师先随机地发给每个孩子若干颗糖果,然后按以下规则调整:每个孩子同时将自己手中的糖果分一半给坐在他右边的小朋友。如共有8个孩子,则第1个
某仓库有两名发货员,一名审核员。当顾客提货时,只要发货员空闲,就允许顾客进入仓库提货,顾客离开时,审核员检验顾客提货是否正确。其工作流程如图3.16所示。为了利用P/V操作正确地协调它们之间的工作,设置了两个信号量S1和S2,且S1的初值为2,S2的初值为
TheBorderGatewayProtocol(BGP)isaninterautonomoussystem【S1】protoco1.TheprimaryfunctionofaBGPspeakingsystemistoexc
知识产权一般都具有法定的保护期限,一旦保护期限届满,权力将自行中止,成为社会公众可以自由使用的知识。(20)受法律保护的期限是不确定的,一旦为公众所熟悉,即成为公众可以自由使用的知识。
Virtualization is an approach to IT that pools and shares(71)so that utilization is optimized and supplies automatically meet de
随机试题
陈某盗窃他人财物被公安机关查获,办案民警在调查中发现其15周岁,对陈某应()。
工序的最小加工余量由()决定。
慢性粒细胞白血病急性变和急性粒细胞白血病的主要区别是
下列属于人体必需的微量元素的是
水电站机组启动验收的各台机组运行时间为投入系统带额定出力连续运行()。
Theyare______ofdifferentpresses.Nowtheyarehavingameetinginoneofthe______office.
(2017·河北)马斯洛需要理论认为,人类最高层的需要是()(常考)
Alcoholmaytastesweeterifyouwereexposedtoitbeforebirth,suggestsastudyinrats.Thefindingsmayshednewlight【C1】_
有三个关系R,S和T如下图所示:则由关系R和S得到关系T的运算是
Everybodywastestime.Insteadofdoinghishomework,theschoolboywatchestelevision.Insteadofwritingheressay,thestuden
最新回复
(
0
)