首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
86
问题
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
软件设计师上午基础知识考试
软考中级
相关试题推荐
假设一个有3个盘片的硬盘,共有4个记录面,转速为7200r/min,盘面有效记录区域的外直径为30cm,内直径为10cm,记录位密度为250bit/mm,磁道密度为8道/mm,每磁道分为16个扇区,每扇区512字节,则该硬盘的非格式化容量和格式化容量约为(
下列概念中不属于成本管理环节的是(10)。
Java语言所编写的程序可以分为两类,Java Applet是对(53)负责的。
I/O端口的编址方法有二种:即I/O端口单独编址方式和UO端口与存储器单元统一编址方式。在某个计算机系统中,内存与I/O是统一编址的,要靠(11)区分和访问内存单元和I/O设备。
请阅读以下说明和Socket程序,填入(n)处。【说明】以下是客户机/服务器模型中的一个简单的客户机程序(服务器程序略),其工作过程非常简单:客户机与服务器建立连接后,接收服务器向客户机返回的一条消息。程序中用到了两种结构hoste
Frame Relay is simplified form of(51), similar in principle to(52), in which synchronous, frames of data are routed to different
Networks can be interconnected by different devices in the physical layer networks can be connected by(1)or hubs. Which just mov
下列关于传输服务的面向连接服务和无连接服务说法中正确的是(27)。
Virtualization is an approach to IT that pools and shares(71)so that utilization is optimized and supplies automatically meet de
VirtualizationisanapproachtoITthatpoolsandshares(1)sothatutilizationisoptimizedandsuppliesautomaticallymeetd
随机试题
植物的主要蒸腾器官是()。
感冒的治疗,可分别采用辛温解表或辛凉解表,此属于()
A、溃疡呈环形与肠的长轴垂直B、溃疡呈长椭网形与肠的长轴平行C、溃疡呈烧瓶状口小底大D、溃疡边缘呈堤状隆起E、溃疡表浅呈地图状肠伤寒的肠溃疡特征是
建筑施工图是根据()绘制的。
当前,房地产市场几乎被西方舶来式建筑风格一统天下,世界级文化遗产苏州园林正面临着严重的_________危机,大师匠人的缺位、传统手艺的失传,都让传统的苏州园林风格_________,几近绝迹。在这种背景下,以富含苏州文化遗产为卖点的房地产项目,引爆市场。
下列事实,属于法律行为的是()。
古代的明君都喜欢自己的臣民直言上谏,而今天有些领导则不然,总是(),相比之下,实在不应该。
1
下列不属于VisualBasic特点的是
•ReadthearticlebelowaboutmoneymanagementinBritain.•Foreachquestion31-40.writeonewordinCAPITALLETTERonyo
最新回复
(
0
)