面向对象的分解好在何处? 口 Reusability数据(结构)及其上之操作的整 体复用,而非仅仅复用操作功能; 口 Extendibility, Continuity:对象更直接对应问题空 间的概念,因而较“功能”更稳定 Institute of Computer Software 2021/1/28 Nanjing University
面向对象的分解好在何处? Reusability: 数据(结构)及其上之操作的整 体复用,而非仅仅复用操作功能; Extendibility, Continuity: 对象更直接对应问题空 间的概念,因而较“功能”更稳定. 2021/1/28 Institute of Computer Software Nanjing University 11
Reality 现实世界 抽家 MOLD INSTANCE 问题世界 Abstract Model ABSTRACT Data T K Objec ype 软件世界 CONCRETE Class (Software) Object Implements Is an instance of
2021/1/28 Institute of Computer Software Nanjing University 现实世界 问题世界 软件世界 Reality 抽象
侧例:考虑一个工资系统 口一开始,客户说他的需求很“简单明确” Employee information Produce Paychecks Paychecks Hours worked Institute of Computer Software 2021/1/28 Nanjing University
例:考虑一个工资系统 一开始,客户说他的需求很“简单明确”: 2021/1/28 Institute of Computer Software Nanjing University 13 Employee information Hours worked Produce Paychecks Paychecks
侧例:考虑一个工资系统 口这种功能明确的系统确实适合结构化的开发方法:自顶向 下,逐步求精。 口你完美地完成了任务。 口而后,极有可能,客户会跑过来跟你说 口给我加个统计报表撒 口下个月我想一些人发记时工资,一些人发计件工资啊行啊,有人 每月一发,有人每周一发哦 口加个个人所得税系统接口 口再加个图像用户界面,用来交互查询吧 Institute of Computer Software 2021/1/28 Nanjing University
例:考虑一个工资系统 这种功能明确的系统确实适合结构化的开发方法:自顶向 下,逐步求精。 你完美地完成了任务。 而后,极有可能,客户会跑过来跟你说: 给我加个统计报表撒 下个月我想一些人发记时工资,一些人发计件工资啊行啊,有人 每月一发,有人每周一发哦 加个个人所得税系统接口 再加个图像用户界面,用来交互查询吧 …… 2021/1/28 Institute of Computer Software Nanjing University 14
最病 文“面向对象的软件构造”含义(1) 口面向对象的软件构造(○OSC)乃是基于系统所 操作之对象类型(而非系统需实现之功能)来 架构系统的途径。 a Meyer: Object-oriented software construction is the approach to system structuring that bases the architecture of software systems on the types of objects they manipulate- not on"the"function they achieve Institute of Computer Software 2021/1/28 Nanjing University
“面向对象的软件构造”含义(1) 面向对象的软件构造(OOSC)乃是基于系统所 操作之对象类型(而非系统需实现之功能)来 架构系统的途径。 Meyer: “Object-oriented software construction is the approach to system structuring that bases the architecture of software systems on the types of objects they manipulate — not on “the” function they achieve.” 2021/1/28 Institute of Computer Software Nanjing University 15