首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
55
问题
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
软件设计师上午基础知识考试
软考中级
相关试题推荐
若信号带宽为40Hz,理想信道可以达到的最大码元速率为(17)。若码元可以取8种离散值,则一个码元携带的信息量为(18)比特,此时,理想信道传输信号带宽为40Hz的数据速率为(19)。
在因特网的路由选择协议中,属于外部网络协议的是(27),按固定时间间隔和相邻路由器交换路由表信息的协议是(28)。该协议最大特点是(29),它使用(30)传输信息。此协议报文最大长度、最多可包括的路由数和最大距离分别是(31)。
Networkmanagershavelongawaitedpracticalvoice-over-IP(VOIP)solutions.VOIPpromiseseasenetworkmanagementanddecreases(6
公开密钥加密是一种(43)。常用的公钥加密算法有(44),它的一个比较知名的应用是(45),这种应用的协商层用公钥方式进行身份认证,记录层涉及到对应用程序提供的信息的分段、压缩、数据认证和加密。
下面是一个简单的使用RAWSOCKET实现的ping程序,填入(n)处。/*simplepingprogram*/structsockaddr_insaddr;intrawsock;unsignedshorti
对欲访问特定信息的发起者的身份或者对传送的报文完整性进行合法性审查或核实的行为称为(50)。在日常生活中,我们可以用手写签名来防止否认的发生。在计算机通信中,要解决这类问题,可采用的方法是(51)。关于客户/服务器应用模式,说法正确的是(52)。在理论上,
linux下在安装了Web服务器后,当在inted下启动时,在系统文件/etc/senices中要添加(54),在单独运行时,命令是(55)。Web系统的系统配置文件(56),它定义了服务器在DNS数据库中注册的主机名,这是通过(57)命令定义的。测试WW
通过SNMP可以获得网络中各种设备的状态信息,还能对网络设备进行控制。在WindowsServer2003中可以采用IPSec来保护SNMP通信,如果密钥交换设置采用“主密钥完全向前保密(PFS)(P)”,则“身份验证和生成密钥间隔”默认值为480分钟
Virtualization is an approach to IT that pools and shares(71)so that utilization is optimized and supplies automatically meet de
VirtualizationisanapproachtoITthatpoolsandshares(1)sothatutilizationisoptimizedandsuppliesautomaticallymeetd
随机试题
用钨极氩弧焊焊接较小的由珠光体钢和奥氏体钢组成的异种钢接头时,可不采用填充金属材料。
痢下白多赤少,一般多重用()
由钻探取得某原状土样,经试验测得土的天然重度γ=17kN/m3,含水量ω=13.2%,土粒相对密度ds=2.69。土的有效重度γ’最接近以下______项数值?
主张把课程的重点放在现实社会问题、社会改造和社会活动计划上的是()。
综合实践活动的四大指定领域是研究性学习、社区服务与社会实践、信息技术教育和()。
当在消毒柜中消毒时,不含水分的餐盘包括其内部,可以达到很高的、足以把所有引起餐盘中毒的细菌杀死的温度;但是含有水分的餐盘的内部则达不到这样高的温度。由上述断定不能推出的结论是哪项?
以下各项除()以外均属于在产品成本。(暨南大学,2011)
我国《合同法》第122条规定:“因当事人一方的违约行为,侵害对方人身、财产权益的,受损害方有权选择依照本法要求其承担违约责任或者依照其他法律要求其承担侵权责任。”请分析:根据本条规定分析对侵权责任和违约责任竞合的处理。
It’snotgoodtobelate______school.
NoonepersonhasdonemoretoshapemodernsexualvaluesinAmerica—andthereforetheWesternworld—thanDr.AlfredKinsey.T
最新回复
(
0
)