首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
89
问题
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://kaotiyun.com/show/arxZ777K
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
在结构化分析方法中,数据字典是重要的文档。对加工的描述是数据字典的组成内容之一,常用的加工描述方法(14)。
假设一个有3个盘片的硬盘,共有4个记录面,转速为7200r/min,盘面有效记录区域的外直径为30cm,内直径为10cm,记录位密度为250bit/mm,磁道密度为8道/mm,每磁道分为16个扇区,每扇区512字节,则该硬盘的非格式化容量和格式化容量约为(
在因特网的路由选择协议中,属于外部网络协议的是(27),按固定时间间隔和相邻路由器交换路由表信息的协议是(28)。该协议最大特点是(29),它使用(30)传输信息。此协议报文最大长度、最多可包括的路由数和最大距离分别是(31)。
在Linux系统的路由配置中,若设置静态路由,则需(17)命令。在使用该命令时为了防止出现错误,可以将网络名字代替网络号,而网络名字可以在文件(18)中定义。为了将手工配置的命令存储下来,在系统启动时自动执行,可以通过(19)来实现。若运行动态路由,则(2
一般认为决定局域网特性的主要技术有三个,它们是(20)。
在LAN拓扑机构中,(86)是最古老的一种连接方式,结构是具有中心节点的拓扑;(87)是使用同一媒体或电缆连接所有端用户的一种方式,可以用令牌传递或用CSMA/CD控制媒体访问的拓扑;(88)在LAN中使用较多,仅使用象令牌传递这样的确定性的媒体空转法。
某仓库有两名发货员,一名审核员。当顾客提货时,只要发货员空闲,就允许顾客进入仓库提货,顾客离开时,审核员检验顾客提货是否正确。其工作流程如图3.16所示。为了利用P/V操作正确地协调它们之间的工作,设置了两个信号量S1和S2,且S1的初值为2,S2的初值为
下列关于传输服务的面向连接服务和无连接服务说法中正确的是(27)。
路由器命令“Router(config)#access—listldeny192.168.1.1”的含义是__________。(2012年上半年试题)
如图3-1所示为一确定有限自动机(DFA)的状态转换图,与该自动机等价的正规表达式是(1),图中的(2)是可以合并的状态。
随机试题
男,63岁。心尖区可闻及收缩中晚期吹风样杂音及喀喇音,超声心动图可见二尖瓣前叶CD段呈吊床样波形,最可能的诊断是()
当今时代的潮流是( )。
校准剂量点一般是照射野内指定的测量点,该点位于
患者男,65岁,因劳力性胸闷2年,加重3天入院。既往高血压史10年,2型糖尿病4年。查体:神清,血压150/100mmHg,心率80次/分,心界叩诊向左下扩大,听诊心音有力,未闻及杂音。双肺呼吸音清。双下肢轻度凹陷性水肿。发作时心电图示V4~V6、I和aV
脉诊的"寻"法是指()
患者刘某胸痛、咳嗽,低烧20余天。诊断为肺结核而住进传染病区,应执行
在某项目的评标中,某施工单位的投标报价为5000万元人民币,考虑其工期提前获得优惠200万元人民币,评标价为4800万元人民币。该施工单位中标后,招标人要求其压低报价,出于长期合作等因素的考虑,施工单位同意了招标人的要求,双方按照4900万元人民币的价格另
现金流量表的“现金”单指库存现金。()
税务师在审核企业金融商品转让业务的增值税时,下列说法错误的是()。
A、InBoston.B、inConcord.C、InLexington.D、InBritain.A
最新回复
(
0
)