首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
64
问题
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、free-standing
B、alone
C、only
D、lonely
答案
A
解析
转载请注明原文地址:https://www.kaotiyun.com/show/arxZ777K
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
若信号带宽为40Hz,理想信道可以达到的最大码元速率为(17)。若码元可以取8种离散值,则一个码元携带的信息量为(18)比特,此时,理想信道传输信号带宽为40Hz的数据速率为(19)。
PPP协议是数据链路层的一个协议,它被广泛用于接入Internet中。PPP协议是一个(53)。帧长为整数个字节。它克服了SLIP协议的缺点,可以进行协商,并且(54)。它可以分成3个层次,其中的网络层协议被称为(55),包括了不同的网络层协议。利用PPP
RS-232-C是目前常见的一种接口标准,它是由(32)提供制定的。该标准在OSI模型中属于(33)层协议标准,通过RS-232-C来连接两个设备最少要连接(34)条线。这个标准的设计数据速率是处理(35)bit/s。(35)bit/s条件下,采用RS-4
程序的(39)理论是虚拟存储管理系统的基础。根据这个理论,Denning又提出了工作集理论。工作集是进程运行时被频繁地访问的页面集合。在进程运行时,如果它的工作集页面都在(40)内,能够使该进程有效地运行,否则会出现频繁的页面调入/调出现象。
该企业网络的核心层采用了ATM技术,由三台ATM交换机互联构成。试对ATM网络技术的主要特点、协议分层结构和优点作简要叙述。图1.3中用了两台路由器,Router1,和Router2,简述路由器的技术特点,并说明Router1和Router2在本网中
下面是一个面向连接的SOCKET实例,填入(n)处。【说明】代码实例中的服务器通过socket连接向客户端发送字符串"Hello,youareconnected!"。只要在服务器上运行该服务器软件,在客户端运行客户软件,客户端就会收到该
某仓库有两名发货员,一名审核员。当顾客提货时,只要发货员空闲,就允许顾客进入仓库提货,顾客离开时,审核员检验顾客提货是否正确。其工作流程如图3.16所示。为了利用P/V操作正确地协调它们之间的工作,设置了两个信号量S1和S2,且S1的初值为2,S2的初值为
Socket的通信方式包括(62),(63)是最常用的套接字类型。
(71)Inthestrengthofthecarriersignalisvariedtorepresentbinary1or0.(72)isasystemthatcanmapanametoan
某一非确定性有限自动机(NFA)的状态转换图如下图所示,与该NFA等价的正规式是(28),与该NFA等价的DFA是(29)。
随机试题
二次积分f(x,y)dy等于()
猩红热的临床表现有何特点?
关于高血压性心脏病的病理改变描述,错误的是
对膳食纤维的叙述不正确的是()。
技术经济指标用以衡量()的水平。
发包人在接到承包人返还保证金申请后14日内不予答复,经催告________内仍不予答复,视同认可承包人的返还保证金申请。()
巴林银行事件后,欧美各主要银行和基金纷纷采取措施,加强机构投资者的内部风险监控,采取的主要措施有()。
以下说法合适的有()。
下列不属于专用物业的共同特点的是()
阅读下面的材料,按要求作文。某一布鞋品牌老板的经营模式很简单,每卖出一双鞋子就捐赠一双给贫困地区的孩子,让没有鞋穿的孩子拥有一双自己的鞋。可是生意却不见起色。半年后,一家报社报道了“卖一双,捐一双”的故事,立刻引起了轰动。人们为他的事迹所感动。一天之内
最新回复
(
0
)