面向对象技术.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
面向对象技术.ppt

Information hiding * Institute of Computer Software Nanjing University * 理由: 模块连续性 亦有助于 Decomposability,Composabilty, Understandability等 模块用户只需关注public的部分 模块 * Institute of Computer Software Nanjing University * 模块的根本特征是“相对独立,功能单一”。换言之,一个好的模块必须具有高度的独立性和相对较强的功能。 “耦合度”和“内聚度” 耦合度,是指模块之间相互依赖性大小的度量,耦合度越小,模块的相对独立性越大。 内聚度,是指模块内各成份之间相互依赖性大小的度量,内聚度越大,模块各成份之间联系越紧密,其功能越强。 在模块划分应当做到“耦合度尽量小,内聚度尽量大”。 Five Principles Linguistic Modular Units Self-Documentation Uniform Access Open-Closed Single-Choice * Institute of Computer Software, Nanjing University * 主要是程序设计语言的设计原则 软件复用 * Institute of Computer Software Nanjing University * 为什么要复用? 复用什么? 问题 非技术 技术 解决途径? 为什么要“复用” * Institute of Computer Software Nanjing University * “懒惰” 提高生产率 改善质量 复用什么 * Institute of Computer Software Nanjing University * 人 设计,规约 设计模式 体系结构 应用框架 源码级复用 封装模块 (抽象描述) 非技术障碍 * Institute of Computer Software Nanjing University * 心理 不信任 旧习惯 短期利益 构件检索 构件发布 与 商业模型 技术问题 * Institute of Computer Software Nanjing University * 复用的本质困难 通常不能一成不变地拿来就用 Reusability Extensibility 软件的开放性要求和封闭性要求之间的冲突 对象技术比传统技术有明显改善 传统技术复用支持 * Institute of Computer Software Nanjing University * 过程 Routine 成功应用:数值计算函数库 问题明确 规约简单 问题相互独立 数据结构相对简单 不足:对adaption的支持弱 若要一个routine支持多种variants 则需好多参数 一个routine支持一种variant则没有factoring out common behaviors. 传统技术复用支持 * Institute of Computer Software Nanjing University * 包 package Linguistic Modular Unit Features (变量 过程) 信息隐蔽 单独编译 Encapsulation languages (“Object-based”) Ada, Modula-2, CLU... Basic idea: gather a group of routines serving a related oo-purpose, such as has, insert, remove etc., together with the appropriate data structure descriptions. Advantages: For supplier author: Get everything under one roof. Simplifies configuration management, change of implementation, addition of new primitives. For client author: Find everything at one place. Simplifies search for existing routines, requests for extensions. * Institute of Computer Software, Nanjing University * 传统技术复用支持 包 作为

文档评论(0)

magui + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8140007116000003

1亿VIP精品文档

相关文档