首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
21
问题
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://jikaoti.com/ti/pVa7FFFM
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
假设一个有3个盘片的硬盘,共有4个记录面,转速为7200r/min,盘面有效记录区域的外直径为30cm,内直径为10cm,记录位密度为250bit/mm,磁道密度为8道/mm,每磁道分为16个扇区,每扇区512字节,则该硬盘的非格式化容量和格式化容量约为(
在因特网的路由选择协议中,属于外部网络协议的是(27),按固定时间间隔和相邻路由器交换路由表信息的协议是(28)。该协议最大特点是(29),它使用(30)传输信息。此协议报文最大长度、最多可包括的路由数和最大距离分别是(31)。
在Linux系统的路由配置中,若设置静态路由,则需(17)命令。在使用该命令时为了防止出现错误,可以将网络名字代替网络号,而网络名字可以在文件(18)中定义。为了将手工配置的命令存储下来,在系统启动时自动执行,可以通过(19)来实现。若运行动态路由,则(2
下面给出了一些软件编码的原则,其中错误的是(9)。
下面有关NTPS文件系统优点的描述中,(18)是不正确的。要把FAT32分区转换为NTFS分区,并且保留原分区中的所有文件,不可行的方法是(19)。
下面是一个简单的使用RAWSOCKET实现的ping程序,填入(n)处。/*simplepingprogram*/structsockaddr_insaddr;intrawsock;unsignedshorti
在数据通信中,将信道上的模拟信号变换成数字信号的过程称为(26)。
路由器命令“Router(config)#access-listldeny192.168.1.1”的含义是____________。
BorderGatewayProtocol(BGP)isinter-autonomoussystem(71)protoc01.BGPisbasedonaroutingmethodcalledpathvectorrouting
VirtualizationisanapproachtoITthatpoolsandshares(1)sothatutilizationisoptimizedandsuppliesautomaticallymeetd
随机试题
艾青的成名作是《雪落在中国的土地上》。()
室间隔缺损患者出现艾森曼格综合征时,血流动力学改变错误的是
婴儿,11月龄。腕部X线片示骨骺端临时钙化带消失,呈杯口状,毛刷状改变,血清钙1.85mmol/L(7.4mg/dl),磷1.8mmol/L(5.8mg/dl),碱性磷酸酶40U(布氏)。哪一点不是骨样组织堆积所致
虚喘辨证应辨病变脏腑,分别是()
《义务教育生物学课程标准(2011年版)》确定的义务教育阶段的生物学课程的主要目的是()。
导致学习发生的因素是
在建设有中国特色的社会主义经济方面,我们国家的基本目标是()。
马克思说,人在“劳动过程结束时得到的结果,在这个过程开始时就已经在劳动者的表象中存在着,即已经观念地存在着”。这表明意识活动
支持子程序调用的数据结构是( )。
PASSAGEONE
最新回复
(
0
)