面向对象的分析与设计方案简介.ppt
《面向对象的分析与设计方案简介.ppt》由会员分享,可在线阅读,更多相关《面向对象的分析与设计方案简介.ppt(68页珍藏版)》请在三一文库上搜索。
1、面向对象的分析与设计简介,OOA & OOD: An introduction,2019/4/28,Institute of Computer Software Nanjing University,1,摘要,引言 如何发现“类” 如何设计“类” 小结,2019/4/28,Institute of Computer Software Nanjing University,2,摘要,引言 如何发现“类” 如何设计“类” 小结,2019/4/28,Institute of Computer Software Nanjing University,3,面向对象软件工程,2019/4/28,Insti
2、tute of Computer Software Nanjing University,4,问题域,需求分析,总体设计,详细设计,计算机,OOT,OOP,OOD,OOA,问题域,编程,测试,计算机,自然语言,自然语言,分析与设计的鸿沟,编程语言,自然语言,面向对象的编程语言,传统的软件工程方法,面向对象的软件工程方法,面向对象软件工程,面向对象方法真正意义深远的目标是它适合于解决分析与设计期间的复杂性并实现分析与设计的复用。 面向对象的开发不仅仅是编程,必须在整个软件生命周期采用一种全新的方法:在软件开发过程所有阶段都运用面向对象的方法,将OOA,OOD,OOP,OOT有机地集成在一起,这样
3、有利于系统的稳定性。,2019/4/28,Institute of Computer Software Nanjing University,5,面向对象软件工程,喷泉模型 以用户需求为动力,以对象为驱动 各阶段是相互迭代和无间隙的 使用相同的描述方法和模型,使得软件生存期各阶段所使用的方法、技术具有高度的连续性。,2019/4/28,Institute of Computer Software Nanjing University,6,2019/4/28,Institute of Computer Software Nanjing University,7,面向对象方法,Booch Coad
4、/Yourdon OMT:对象模型,功能模型,动态模型 Jacobson UML,三种基本活动 识别类和对象 描述对象和类之间的关系 通过描述每个类的功能定义对象的行为,面向对象方法,Rational Unified Process (RUP) Rational统一开发过程 迭代式的增量开发 用例驱动 以软件体系结构为核心,2019/4/28,Institute of Computer Software Nanjing University,8,面向对象的分析与设计,OO方法强调开发过程的连续性 构造一系列不断精化的面向对象的模型 实际上目前大多倾向于采用迭代式开发 类成为分析、设计和实现的基
5、本单元 核心问题: How to find the classes (不同层面的类)? How to design the classes?,2019/4/28,Institute of Computer Software Nanjing University,9,推荐,Craig Larman: Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and Iterative Development,2019/4/28,Institute of Computer Software N
6、anjing University,10,面向对象分析,OOA是软件开发过程中的问题定义阶段 领域分析(Domain Analysis):抽取和整理用户需求并建立问题域精确模型的过程。以公共对象、类和框架等形式在特定应用领域中标识、分析和规约公共的可复用的软件成分的能力。抽象出目标系统的本质属性,建立问题领域模型。 应用分析(Application Analysis):将领域分析建立起来的问题领域模型,用某种基于计算机系统的语言来表示。响应时间需求、用户界面需求和数据安全等特殊的需求也都在这一层分解抽出。,2019/4/28,Institute of Computer Software Nan
7、jing University,11,面向对象分析,领域分析,2019/4/28,Institute of Computer Software Nanjing University,12,领域知识源,领域分析模型,领域分析,技术文件,专家建议,已有应用,客户考察,目前/未来的需求,类的分类,复用标准,功能模型,领域语言,2019/4/28,Institute of Computer Software Nanjing University,13,面向对象分析,具体步骤,2019/4/28,Institute of Computer Software Nanjing University,14,获
8、取用户基本需求,标识类和对象,定义类的结构和层次,表示类(对象)间的关系,为对象行为建模,常用用例来收集和描述用户的需求,标识类及类的属性和服务,描述系统的静态结构,描述系统的动态行为,2019/4/28,Institute of Computer Software Nanjing University,15,需求分析,Waterfall式开发其需求分析一开始(其实是过早地)确定的features 在最终产品中真正采用情况的比例,Requirement checklist,FURPS+ Functional features, capabilities, security Usability
9、human factors, help, documentation Reliability frequency of failure, recoverability, predictability Performance response times, throughput, accuracy, availability, resource usage. Supportability adaptability, maintainability, internationalization, configurability. “+” Implementation Interface Operat
10、ions Packaging Legal,2019/4/28,Institute of Computer Software Nanjing University,16,Classification,Functional requirements: behavior, features, capabilities,security Usability requirements: human factors, help, documentation “The font on the display should be readable from 5 feet”,2019/4/28,Institut
11、e of Computer Software Nanjing University,17,Classification,Reliability requirements: frequency of failure, recoverability Performance requirements: response times, throughput, accuracy, availability, resource usage, etc.,2019/4/28,Institute of Computer Software Nanjing University,18,Classification,
12、Supportability requirements: adaptability, internationalization, maintainability “The system should allow frequent and easy changes in the network configuration” The + in the FURPS+: Implementation requirements: “Must use Linux and Java”,2019/4/28,Institute of Computer Software Nanjing University,19
13、,面向对象分析,OOA模型,2019/4/28,Institute of Computer Software Nanjing University,20,基本模型(类图),对象层,特征层,关系层,交互图,主题图,详细说明,面向对象设计,OOD是面向对象方法在软件设计阶段应用与扩展的结果,通常分为两个阶段 高层设计:建立应用的体系结构 低层设计:集中于类的详细设计 OOD的准则 抽象,信息隐藏,模块化,弱耦合,强内聚,可重用,2019/4/28,Institute of Computer Software Nanjing University,21,面向对象设计,OOD具体内容 按实现条件对OO
14、A模型进行调整,并补充几个新的组成部分: 设计问题域组元 设计人机交互组元 设计任务管理组元 设计数据管理组元,2019/4/28,Institute of Computer Software Nanjing University,22,摘要,引言 如何发现“类” 如何设计“类” 小结,2019/4/28,Institute of Computer Software Nanjing University,23,回顾:三个世界,Three worlds Visual modeling,2019/4/28,Institute of Computer Software Nanjing Univers
15、ity,24,2019/4/28,Institute of Computer Software Nanjing University,25,现实世界,问题世界,软件世界,Reality,抽象,问题:How to find the classes?,Use case 基于需求文档 Use-case model: writing requirements in context,2019/4/28,Institute of Computer Software Nanjing University,26,用例(Use Cases),用例是一个叙述性文档,用来描述参与者使用系统完成某个过程时的事件发生顺
16、序。 用例乃是对过程的描述。 过程描述事件、动作和事务处理自始至终的发生顺序。 Use cases are text documents, not diagrams, and use-case modeling is primarily an act of writing text, not drawing diagrams.,2019/4/28,Institute of Computer Software Nanjing University,27,Use Case例子:,Process Sale: A customer arrives at a checkout with items to
17、 purchase. The cashier uses the POS system to record each purchased item. The system presents a running total and line-item details. The customer enters payment information, which the system validates and records. The system updates inventory. The customer receives a receipt from the system and then
18、 leaves with the items.,2019/4/28,Institute of Computer Software Nanjing University,28,Actor, Scenario, Use Case,简单地说, an actor is something with behavior, such as a person (identified by role), computer system, or organization; for example, a cashier. A scenario is a specific sequence of actions an
19、d interactions between actors and the system; it is also called a use case instance. It is one particular story of using a system, or one path through the use case; for example, the scenario of successfully purchasing items with cash, or the scenario of failing to purchase items because of a credit
20、payment denial. a use case is a collection of related success and failure scenarios that describe an actor using a system to support a goal. For example, here is a casual format use case with alternate scenarios:,2019/4/28,Institute of Computer Software Nanjing University,29,Process Sale,2019/4/28,I
21、nstitute of Computer Software Nanjing University,30,2019/4/28,Institute of Computer Software Nanjing University,31,Actor有Goal,Ivar Jacobson: A set of use-case instances, where each instance is a sequence of actions a system performs that yields an observable result of value to a particular actor. 软件
22、工程师容易犯的错误:自认为所做的是客户/ 用户需要的。 不能代替客户/用户假想其价值所在。,2019/4/28,Institute of Computer Software Nanjing University,32,创建USE CASE的一些原则,用例可以是一个场景,包括动作和交互。 用例可以是一组场景,描述不同场景下的行为。这种书写格式可以在任何时候描述有变体的行为,例如黑盒需求,业务流程,系统设计说明。 用例里不要有系统设计,用例里不要有界面设计,用例里不要有特性列表,用例里不要有测试。 用例应该描述行为需求。 用例的主场景不要超过九步。可以在适当的层次上得到子目标和移除设计说明。 用例
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 面向 对象 分析 设计方案 简介
链接地址:https://www.31doc.com/p-2643177.html