首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
31
问题
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
软件设计师上午基础知识考试
软考中级
相关试题推荐
在Linux系统的路由配置中,若设置静态路由,则需(17)命令。在使用该命令时为了防止出现错误,可以将网络名字代替网络号,而网络名字可以在文件(18)中定义。为了将手工配置的命令存储下来,在系统启动时自动执行,可以通过(19)来实现。若运行动态路由,则(2
下列概念中不属于成本管理环节的是(10)。
输入/输出系统主要用三种方式与主机交换数据,对于这三种方式的描述正确的是(1)。
阅读以下有关VLAN的叙述,分析设备配置文件,回答下面问题。虚拟局域网(VirtualLAN)是一种不用路由器,而由第三层交换机来实现广播数据的抑制的方案。是在交换网络环境中实现的。虚拟局域网技术和第三层交换技术一样,都是近年发展起来的一种网络新
(71)Inthestrengthofthecarriersignalisvariedtorepresentbinary1or0.(72)isasystemthatcanmapanametoan
BorderGatewayProtocol(BGP)isinter-autonomoussystem(71)protoc01.BGPisbasedonaroutingmethodcalledpathvectorrouting
TheBorderGatewayProtocol(BGP)isaninterautonomoussystem(6)protocol.TheprimaryfunctionofaBGPspeakingsystemistoex
某LinuxDHCP服务器dhepd.conf的配置文件如下:ddns-update-stylenone;subnet192.168.0.0netmask255.255.255.0{range192.168.0.200192.168.0.254:i
Wi-Fi联盟制定的安全认证方案WPA(Wi-FiProtectedAccess)是______标准的子集。
路由器命令“Router(config)#access—listldeny192.168.1.1”的含义是__________。(2012年上半年试题)
随机试题
公安机关的人民警察(),可以优先乘坐公共交通工具。
MBO/R是指_________。技术。
有关SARS—CoV的描述,不正确的是
客户交易结算资金第三方存管制度充分体现了()的原则。
某超市报告期与基期相比,销售额增加5%,单位成本下降5%,那么生产费用()。
在报表的视图中,既能够预览输出结果,又能够对控件进行调整的视图是
Readtheletterbelowaboutanagencyprovidingtemporarystaffforcompanies.ChoosethebestwordtofilleachgapfromA,B,
Ascientifictheoryisapublicpronouncementthatindicateswhatascientistbelievestobetrueabouthisorherspecificare
Hehastoappearatcourttomorrowmorningasheis_____speeding.
Reebokexecutivesdonotliketoheartheirstylishathleticshoescalled"footwearforyuppies(雅皮士,少壮高薪职业人士)".Theycontendtha
最新回复
(
0
)