首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
38
问题
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、aggregation
B、using
C、composition
D、association
答案
A
解析
转载请注明原文地址:https://kaotiyun.com/show/YrxZ777K
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
在CSMA中,决定退让时间的算法为:①如果信道空闲,以户的概率发送,而以(1-p)的概率延迟一个时间单位t;②如果信道忙,继续监听直至信道空闲并重复步骤①;③如果发送延迟了一个时间单位t,则重复步骤①。上述算法为(14)。
若信号带宽为40Hz,理想信道可以达到的最大码元速率为(17)。若码元可以取8种离散值,则一个码元携带的信息量为(18)比特,此时,理想信道传输信号带宽为40Hz的数据速率为(19)。
假设一个有3个盘片的硬盘,共有4个记录面,转速为7200r/min,盘面有效记录区域的外直径为30cm,内直径为10cm,记录位密度为250bit/mm,磁道密度为8道/mm,每磁道分为16个扇区,每扇区512字节,则该硬盘的非格式化容量和格式化容量约为(
PPP协议是数据链路层的一个协议,它被广泛用于接入Internet中。PPP协议是一个(53)。帧长为整数个字节。它克服了SLIP协议的缺点,可以进行协商,并且(54)。它可以分成3个层次,其中的网络层协议被称为(55),包括了不同的网络层协议。利用PPP
基于TCP/IP的互联网服务中,IP协议提供主机之间的(42)分组传输服务。TCP协议提供端口之间的(43)文传输服务;U-DP属于(44)协议,从其下一层接收了数据以后,根据(45)将之分解咸UDP数据报;应用层的(46)协议可以使用UDP或TCP协议传
在CSMA中,决定退让时间的算法如下(1)如果信道空闲,则以P的概率发送,而以1-P的概率延迟一个时间单位to(2)如果信道忙,则继续监听直至信道空闲并重复步骤(1)。(3)如果发送延迟了一个时间单位t,则重复步骤(1)。上
虚拟存储,就是把多个存储介质模块(如硬盘、RAID)通过一定的手段集中管理起来,所有的存储模块在一个存储池(StoragePool)中得到统一管理。虚拟存储管理系统是以程序的(5)理论为基础的,其基本含义是指程序执行时往往会不均匀地访问主存储器单元。根据
阅读以下说明和交换机的配置信息,回答下面问题。【说明】某公司下设三个部门,为了便于管理,每个部门组成一个VLAN,公司网络结构如图2.8所示。[交换机Switch1的部分配置信息]Switch1(config)#fi
某仓库有两名发货员,一名审核员。当顾客提货时,只要发货员空闲,就允许顾客进入仓库提货,顾客离开时,审核员检验顾客提货是否正确。其工作流程如图3.16所示。为了利用P/V操作正确地协调它们之间的工作,设置了两个信号量S1和S2,且S1的初值为2,S2的初值为
两个人利用Netphone通话时,对语言格式的解释是由(19)完成的。
随机试题
简述水土流失预防的禁止性措施。
A.白细胞B.纤维素C.血小板和纤维素D.血小板和白细胞E.白细胞和纤维素透明血栓的组成是
女性,31岁,发现“风湿性瓣膜病”2年。2周前因感冒出现呼吸困难,咳嗽,不能平卧。查体:半卧位,颈静脉充盈,双肺底湿啰音。心率127次/分,心房颤动,可闻开瓣音,心尖部舒张期杂音,肝肋下0.5cm,下肢轻度水肿。此时首选的治疗是
A.压力感受性反射B.化学感受性反射C.心肺感受器引起的心血管反射D.躯体感受器引起的心血管反射主要对人体血容量和体液量进行调节的是
在孕妇腹壁上听诊,与母体心率相一致的音响是下列何项
旋转阳极管套上的膨胀鼓一般设在
在经济持续繁荣增长时期,利率上升;当经济萧条市场疲软时,利率下降。()
Insuranceisthesharingofrisks.Nearlyeveryoneisexposedtoriskofsomesort.Thehouseowner,forexample,knowsthathispro
InthefirstyearorsoofWebbusiness,mostoftheactionhasrevolvedaroundeffortstotaptheconsumermarket.Morerecentl
Questions14and15ChoosetheappropriatelettersA-Dandwritetheminboxes14and15onyouranswersheet.*
最新回复
(
0
)