首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
41
问题
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、distinction
B、level
C、grade
D、hierarchy
答案
D
解析
转载请注明原文地址:https://kaotiyun.com/show/4rxZ777K
本试题收录于:
软件设计师上午基础知识考试题库软考中级分类
0
软件设计师上午基础知识考试
软考中级
相关试题推荐
设某单位路由器建立了以下的路由表,若收到分组的目的IP地址为128.96.37.151,则转发的端口是(63),若收到分组的目的IP是128.96.35.151,则转发的端口是(64),若该路由器是该单位与Internet连接的路由器,则该单位分得的IP地
RS-232-C是目前常见的一种接口标准,它是由(32)提供制定的。该标准在OSI模型中属于(33)层协议标准,通过RS-232-C来连接两个设备最少要连接(34)条线。这个标准的设计数据速率是处理(35)bit/s。(35)bit/s条件下,采用RS-4
为了进行差错控制,必须对传送的数据帧进行校验。在局域网中广泛使用的校验方法是(7)校验。CRC-16标准规定的生成多项式为G(x)=X16+X15+X2+1,它产生的校验码是(8)位,接收端发现错误后采取的措施是(9)。如果CRC的生成多项式为G(X)=X
下面给出了一些软件编码的原则,其中错误的是(9)。
在分布式数据库的类型中,网络中有一个中心站,在这个站点上存放着所有的数据,这种类型是(56)。
在CSMA中,决定退让时间的算法如下(1)如果信道空闲,则以P的概率发送,而以1-P的概率延迟一个时间单位to(2)如果信道忙,则继续监听直至信道空闲并重复步骤(1)。(3)如果发送延迟了一个时间单位t,则重复步骤(1)。上
计算机内存中是按字节编址的,现在有一地址范围是从A4000H到CBFFFH,那么此地址范围共占据(31)个字节。若用存储容量为16K×8bit的存储芯片构成该内存,至少需要(32)片。
下面是一个面向连接的SOCKET实例,填入(n)处。【说明】代码实例中的服务器通过socket连接向客户端发送字符串"Hello,youareconnected!"。只要在服务器上运行该服务器软件,在客户端运行客户软件,客户端就会收到该
04B/5B编码是一种两级编码方案,首先要把数据变成(13)编码,再把4位分为一组的代码变换成5单位的代码。这种编码的效率是()。
TheBorderGatewayProtocol(BGP)isaninterautonomoussystem(6)protocol.TheprimaryfunctionofaBGPspeakingsystemistoex
随机试题
在行政机关强制执行程序中,第三人对执行标的主张权利并确有理由的,应()。
患儿,4岁,1个月来反复阵发性咳嗽、发热,咳脓性痰,体质消瘦,X线拍片见左肺有肺不张。现患儿无明显呼吸困难,但支气管炎、肺炎较重且伴有高热、体质虚弱,宜进行哪种处理
患者,女,47岁。因胆囊结石、慢性胆囊炎行胆囊切除术术后2年,近1周出现阵发性腹痛伴频繁呕吐,停止排气排便1天入院。查体:腹稍胀,上腹部压痛,肠鸣音亢进。首先应做的检查是
CBA的中文名称是( )。
甲公司为增值税一般纳税人,厂房适用的增值税税率为10%,生产线、存货适用的增值税税率为16%。资料一:经董事会批准,甲公司2×18年年末在生产经营期间以自营方式同时对一条生产线和一栋厂房进行改造。生产线与厂房是2×14年3月达到预定可使用状态并投入使用,
中小学管理的基本内容包括思想品德教育管理、教育工作管理、教务行政管理和______。
根据我国宪法规定,乡、镇一级的人民代表大会每届任期()。
窗体在屏幕上显示后有______种方法可以清除它。
WhatisFreud’scontributionstopsychology?
Inanefforttosustaincommercialandrecreationalfishingforthenextseveraldecades,theUnitedStatesthisyearwillbecom
最新回复
(
0
)