OO方法、RUP与UML建模讲义

上传人:jiups****uk12 文档编号:44706499 上传时间:2018-06-14 格式:PPT 页数:125 大小:880.50KB
返回 下载 相关 举报
OO方法、RUP与UML建模讲义_第1页
第1页 / 共125页
OO方法、RUP与UML建模讲义_第2页
第2页 / 共125页
OO方法、RUP与UML建模讲义_第3页
第3页 / 共125页
OO方法、RUP与UML建模讲义_第4页
第4页 / 共125页
OO方法、RUP与UML建模讲义_第5页
第5页 / 共125页
点击查看更多>>
资源描述

《OO方法、RUP与UML建模讲义》由会员分享,可在线阅读,更多相关《OO方法、RUP与UML建模讲义(125页珍藏版)》请在金锄头文库上搜索。

1、OO方法、RUP与UML建模首席软件专家 张恂 博讯科技(上海)有限公司 浩方科技集团 2000.11主要内容一、OOAD与UML表示法二、RUP建模过程与步骤三、讨论一、OOAD与UML表示法OO原则 Abstraction(抽象) Encapsulation(封装) Modularity(模块化) Hierarchy(分层)OO三要素 封装 继承 多态OO基本概念 对象 类 属性 操作(方法) 接口(多态)* 构件* 关系 包 子系统*接口与多态 Polymorphism: The ability to hide many different implementations behind

2、a single interface. Interfaces formalize polymorphism, support “plug-and-play” architectures.接口与多态Component A non-trivial, nearly independent, and replaceable part of a system that fulfills a clear function in the context of a well- defined architecture. source code component, run time components, e

3、xecutable componentSubsystem A combination of a package (can contain other model elements) and a class (has behavior) Realizes one or more interfaces which define its behavior.OOAD是主流技术OOAD大部分情况下比结构化设计好: 结构化设计是过时的东西,它强调软件的结构按照功 能来组织,一旦功能改变,软件的结构就会不稳定。 而OO设计把数据流和功能统一起来,IT行业绝大部分 (70-80%)的软件设计(包括数据库设计)

4、可以采用 OO方法,目前国外流行的趋势也是这样,剩下的少部 分有特定需求的可能还会用传统方法。 另外在电信界,用有限自动状态机的SDL方法仍占绝 大数,但现在UML和SDL出现了融合的趋势。Object Oriented Analysis 用面向对象方法分析问题域,建立基于 对象、消息的业务模型,形成对客观世 界和业务本身的正确认识。 生成业务对象的动、静态模型和抽象类 。Object Oriented Design 针对OOA给出的问题域模型,用面向对 象方法设计出软件基础架构(概要设计 )和完整的类结构(详细设计),以实 现业务功能。 生成对象类的动、静态模型(解决域) 。Analysis

5、 vs. Design Analysis Focus on understanding the problem Idealized design Behavior System Structure Functional requirements A small model Design Focus on understanding the solution Operations and Attributes Performance Close to real code Object lifecycles Non-functional requirements A large model“4+1

6、”视图 Use Case View (End-user: Functionality) Logical View (Analysts/Designers: Structure) Process View (System integrators: Performance, Scalability, Throughput) Implementation View (Programmers:Software management) Deployment View (System engineering: System Topology, Delivery, installation, communi

7、cation)UML图示 Use Case Diagram Sequence Diagram Class Diagram Collaboration Digram State Diagram Activity Diagram Component Diagram Deployment DiagramActor - 用户 “An Actor defines a coherent set of roles that users of use cases play when interacting with use cases. An actor has one role for each use c

8、ase with which it communicates.” 角色的集合,可以是人或外部系统。 定义了“系统边界”。Use Case - 用例The specification of a sequence of actions, including variants, that a system (or other entity) can perform, interacting with actors of the system. A use case is a coherent unit of functionality provided by a system, a subsyste

9、m, or a class as manifested by sequences of messages exchanged among the system and one or more outside interactors (called actors) together with actions performed by the system.Business Use Case/ActorBusiness - System 例子课程登记系统Use Case依赖关系 Association The participation of an actor in a use case, i.e

10、. instances of the actor and instances of the use case communicate with each other. This is the only relationship between actors and use cases. Extend An extend relationship from use case A to use case B indicates that an instance of use case B may be extended (subject to specific conditions specifi

11、ed in the extension) by the behavior specified by A. The behavior is inserted at the location defined by the extension point in B which is referenced by the extend relationship.Use Case依赖关系 Generalization A generalization from use case A to use case B indicates that A is a specialization of B. Inclu

12、de An include relationship from use case A to use case B indicates that an instance of the use case A will also include the behavior as specified by B. The behavior is included at the location which defined in A.产品定购管理Actor GeneralizationSequence DiagramA diagram that shows object interactions arran

13、ged in time sequence. In particular, it shows the objects participating in the interaction and the sequence of messages exchanged. Unlike a collaboration diagram, a sequence diagram includes time sequences but does not include object relationships. A sequence diagram can exist in a generic form (des

14、cribes all possible scenarios) and in an instance form (describes one actual scenario). Sequence diagrams and collaboration diagrams express similar information, but show it in different ways. 序列图元素Use Case描述 简述: This use case allows a Student to register for course offering in the current semester.

15、 The Student can also update or delete course selections if changes are made within the add/drop period at the beginning of the semester. The Course Catalog System provides a list of all the course offerings for the current semester.事件流Basic Flow: This use case start when a Student wishes to registe

16、r for course offerings, or to change his/her existing course schedule. 1. The system requests that the Student specify the function he/she would like to perform (either Create a Schedule, Update a Schedule, or Delete a Schedule). 2. Once the Student provides the requested information, one of the subflows is executed. If the Regi

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 行业资料 > 其它行业文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号