首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
43
问题
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
软件设计师上午基础知识考试
软考中级
相关试题推荐
Networkscanbeinterconnectedbydifferentdevices.Inthephysicallayer,networkscanbeconnectedby(66)orHubs,whichjust
ICMP是Internet控制协议报文协议,它允许主机或路由器报告(37)和提供有关异常情况的报告。它是(38)的组成部分,其报文格式包括报文头和数据区两部分,其中报文头部分是由—些刨等三个字段组成,字段长度分别为(40)。ICMP可作为询问报文,用来测试
在因特网的路由选择协议中,属于外部网络协议的是(27),按固定时间间隔和相邻路由器交换路由表信息的协议是(28)。该协议最大特点是(29),它使用(30)传输信息。此协议报文最大长度、最多可包括的路由数和最大距离分别是(31)。
基于对网络安全性的需求,网络操作系统一般采用四级安全保密机制,即注册安全、用户信任者权限、对答信任者权限屏蔽与(64)。
下面有关NTPS文件系统优点的描述中,(18)是不正确的。要把FAT32分区转换为NTFS分区,并且保留原分区中的所有文件,不可行的方法是(19)。
简述NetBIOS与TCP/IP关系。在OSI参考模型中,NetBIOS工作在哪一层?
关于OSI参考模型中说法不正确的是(19)。
(71)Inthestrengthofthecarriersignalisvariedtorepresentbinary1or0.(72)isasystemthatcanmapanametoan
对欲访问特定信息的发起者的身份或者对传送的报文完整性进行合法性审查或核实的行为称为(50)。在日常生活中,我们可以用手写签名来防止否认的发生。在计算机通信中,要解决这类问题,可采用的方法是(51)。关于客户/服务器应用模式,说法正确的是(52)。在理论上,
子网过滤防火墙安装方法是把防火墙安装在一个由(1)控制边界的公共子网中,子网中有一台执行(2)的主机,对于多数应用入口,需要一个附加的(3)机制来控制、筛选入口与网络之间的信息流。这样可以有效地把该机制和(4)结合起来,达到多层屏障保护的目的。
随机试题
癫痫持续状态的治疗措施包括
模板对类型的参数化提供了很好的支持,因此()。
驾驶机动车在道路变窄的路段可以跟在任何一辆车后汇入车流。
Excel2010中,如果要设置页边距,可以在____________选项卡中进行设置。
∫12(1/x)lnxdx=1/2,则k=()
池壁钢筋混凝土施工程序正确的是()。
“备案号”栏应填()。“数量及单位”栏应填()。
通常情况下,如果预计教育负担比高于(),就应尽早进行准备。
知更鸟之死①对于千百万美国人来说,第一只知更鸟的出现意味着冬天的河流已经解冻。知更鸟的到来作为一项消息报道在报纸上,并且在吃饭时大家热切相告。随着候鸟的逐渐来临,森林开始绿意葱茏,成千的人们在清晨倾听着知更鸟黎明合唱的第一支曲予。然而现在,一切都
Menhavedistinguishedthemselvesfromotheranimals,andindoingsosecuredtheirsurvivalbytheabilitytoobserveand
最新回复
(
0
)