首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
52
问题
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
软件设计师上午基础知识考试
软考中级
相关试题推荐
软件设计的主要任务是设计软件的结构、过程和模块,其中软件结构设计的主要任务是要确定(11)。
为了进行差错控制,必须对传送的数据帧进行校验。在局域网中广泛使用的校验方法是(7)校验。CRC-16标准规定的生成多项式为G(x)=X16+X15+X2+1,它产生的校验码是(8)位,接收端发现错误后采取的措施是(9)。如果CRC的生成多项式为G(X)=X
两个人利用Netphone通话时,对语言格式的解释是由(19)完成的。
在CSMA中,决定退让时间的算法如下(1)如果信道空闲,则以P的概率发送,而以1-P的概率延迟一个时间单位to(2)如果信道忙,则继续监听直至信道空闲并重复步骤(1)。(3)如果发送延迟了一个时间单位t,则重复步骤(1)。上
关于OSI参考模型中说法不正确的是(19)。
有关UDP协议说法不正确的是(25)。
路由器命令“Router(config)#access-listldeny192.168.1.1”的含义是____________。
TheBorderGatewayProtocol(BGP)isaninterautonomoussystem(6)protocol.TheprimaryfunctionofaBGPspeakingsystemistoex
Virtualization is an approach to IT that pools and shares(71)so that utilization is optimized and supplies automatically meet de
下图是一有限自动机的状态转换图,该自动机所识别语言的特点是(45),等价的正规式为(46)。
随机试题
管理者需要具备的技能有()
公平理论对管理者的启示是什么,实际应用中需要注意哪些问题?
经过CDP-甘油二脂途径可合成
女性,60岁,反复咳嗽、咳痰25年,心悸、气促、下肢间歇性水肿3年,病情加重伴畏寒发热1周入院。体检:T38℃,呼吸急促,口唇发绀,双肺叩诊过清音,中下肺有湿哕音,心率110次/分,心律齐,无杂音,双下肢重度水肿。该病例最适当的诊断应为
在基金营销环境的要素中,机构的()会对基金营销产生重要的影响。
我国对集体企业采取的基本政策方针有()。
学生从道德上理解道德规范并不很难,但是要真正把这种要求转化为个人的道德需要,形成道德信念,就必须经过道德实践的亲身体验,其中转化的“催化剂”是()。
国际区域经济合作的形式有哪些?
曙光机械厂、华业机械厂、祥瑞机械厂都在新宁市辖区。他们既是同一工业局下属的兄弟厂,在市场上也是竞争对手。在市场需求的五种机械产品中,曙光机械厂擅长生产产品1、产品2和产品4,华业机械厂擅长生产产品2、产品3和产品5,祥瑞机械厂擅长生产产品3和产品5。如果两
Theeternalmotionofthestarsfascinatedhim.
最新回复
(
0
)