首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
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
24
问题
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
软件设计师上午基础知识考试
软考中级
相关试题推荐
《计算机软件产品开发编制指南》(GB8567-1988)是(22)标准。
假设一个有3个盘片的硬盘,共有4个记录面,转速为7200r/min,盘面有效记录区域的外直径为30cm,内直径为10cm,记录位密度为250bit/mm,磁道密度为8道/mm,每磁道分为16个扇区,每扇区512字节,则该硬盘的非格式化容量和格式化容量约为(
RS-232-C是目前常见的一种接口标准,它是由(32)提供制定的。该标准在OSI模型中属于(33)层协议标准,通过RS-232-C来连接两个设备最少要连接(34)条线。这个标准的设计数据速率是处理(35)bit/s。(35)bit/s条件下,采用RS-4
CMM(软件能力成熟度模型)描述和分析了软件过程能力的发展与改进的程度,确立了一个软件过程成熟程度的分级标准。在初始级,软件过程定义几乎处于无章可循的状态,软件产品的成功往往依赖于个人的努力和机遇;在(44),已建立了基本的项目管理过程,可对成本、进度和功
阅读以下说明,回答下面问题。【说明】某小公司的网络拓扑如图1.6所示。其中路由器具有ISDN模块,公司网络通过ISDN连接到ISP。
目前,国内短消息服务平台按照接入方式主要可分为哪两种?请简要说出网关服务器与短消息服务过程。
某企业的网络拓扑结构如图2.2所示,采用VPN来实现网络安全。请简要叙述从企业总部主机到分支机构主机通过IPsec的通信过程。在进行远程登陆时,最好使用哪种方式(IPSecVPN和SSLVPN)?
两个人利用Netphone通话时,对语言格式的解释是由(19)完成的。
TheSimpleNetworkManagementProtocol(SNMP)isan(71)protocolthatfacilitatestheexchangeofmanagementinformationbetween(7
路由器命令“Router(config)#access-listldeny192.168.1.1”的含义是____________。
随机试题
关于后张法预应力筋的张拉控制,下列说法正确的是()。
除哪项外均为《内经》论病情昼夜变化的原文
工程施工过程中,项目部对施工进度计划应进行定期或不定期审核,目的在于()
某实施施工监理的工程,建设单位按照《建设工程施工合同(示范文本)》与甲施工单位签订了施工总承包合同。合同约定开工日期为2006年3月1日,工期为302d,建设单位负责施工现场外道路开通及设备采购;设备安装工程可以分包;甲施工单位通过筛选与乙施工单位签订了安
()不属于“跳槽热”现象出现的原因。
下列属于道德情感的是()。
结合幼儿园教育实践。试分析:(1)目前幼儿园教育实践中存在着的一些主要问题;(2)由此对教师素养提出的最迫切的要求。
1924年出版了第一本由我国学者编著的《教育心理学》教科书,作者是()。
我国《保险法》将保险公司经营的业务分为()两大类。
S.Koreasubwayarsoninjured______.
最新回复
(
0
)