当前位置:高等教育资讯网  >  中国高校课件下载中心  >  大学文库  >  浏览文档

上海交通大学:《面向对象分析与设计 Object Oriented Analysis and Design》课程教学资源(PPT课件讲稿)06 Other UML Diagrams

资源类别:文库,文档格式:PPT,文档页数:17,文件大小:413KB,团购合买
 Statechart diagrams  Deployment diagrams  Component diagrams
点击下载完整版文档(PPT)

Shanghai Jiao Tong University 上海交通大学 Object Oriented Analysis and Design Other UML Diagrams 上海交通大学软件工程中心

Shanghai Jiao Tong University 上海交通大学软件工程中心 Object Oriented Analysis and Design Other UML Diagrams

Outline Statechart diagrams ◆Deployment diagrams Component diagrams Object Oriented Analysis and Design 2

Object Oriented Analysis and Design 2 Outline  Statechart diagrams  Deployment diagrams  Component diagrams

Review:An Object Has State The state of an object is one of the possible conditions in which an object may exist. The state of an object normally changes over time. ☐Name:J Clark 口Employee ID:567138 HireDate:07/25/1991 Status:Tenured Discipline:Finance MaxLoad:3 Name:J Clark Employee ID:567138 Date Hired:July 25,1991 Status:Tenured Discipline:Finance Professor Clark Maximum Course Load:3 classes Object Oriented Analysis and Design 3

Object Oriented Analysis and Design 3 Review: An Object Has State  The state of an object is one of the possible conditions in which an object may exist.  The state of an object normally changes over time. Name: J Clark Employee ID: 567138 Date Hired: July 25, 1991 Status: Tenured Discipline: Finance Maximum Course Load: 3 classes Name: J Clark Employee ID: 567138 HireDate: 07/25/1991 Status: Tenured Discipline: Finance MaxLoad: 3 Professor Clark

What Are Statechart Diagrams? A statechart diagram shows a state machine. It specifies the sequence of states that an object can be in: The events and conditions that cause the object to reach those states The actions that take place when those states are reached Sample Sample State 1 State 2 Object Oriented Analysis and Design

Object Oriented Analysis and Design 4 What Are Statechart Diagrams?  A statechart diagram shows a state machine.  It specifies the sequence of states that an object can be in: ▪ The events and conditions that cause the object to reach those states ▪ The actions that take place when those states are reached Sample State 1 Sample State 2

Drawing States A state is represented as a rounded rectangle on a statechart diagram. As a comparison,note the subtle difference between a state and an activity Sample Sample State 1 Activity Object Oriented Analysis and Design 5

Object Oriented Analysis and Design 5 Drawing States  A state is represented as a rounded rectangle on a statechart diagram.  As a comparison, note the subtle difference between a state and an activity. Sample State 1 Sample Activity

Special States The initial state is the state entered when an object is created. An initial state is mandatory. Only one initial state is permitted. The initial state is represented as a solid circle. A final state indicates the end of life for an object. A final state is optional. A final state is indicated by a bull's eye. More than one final state may exist. Sample Sample State 1 State 2 Object Oriented Analysis and Design 6

Object Oriented Analysis and Design 6 Special States  The initial state is the state entered when an object is created. ▪ An initial state is mandatory. ▪ Only one initial state is permitted. ▪ The initial state is represented as a solid circle.  A final state indicates the end of life for an object. ▪ A final state is optional. ▪ A final state is indicated by a bull’s eye. ▪ More than one final state may exist. Sample State 1 Sample State 2

What Are Events? An event is the specification of a significant occurrence that has a location in time and space. An event is an occurrence of a stimulus that can trigger a state transition. Example: Adding a student to a course ·Creating a new course Event State A State B Object Oriented Analysis and Design 7

Object Oriented Analysis and Design 7 What Are Events?  An event is the specification of a significant occurrence that has a location in time and space. ▪ An event is an occurrence of a stimulus that can trigger a state transition. ▪ Example: • Adding a student to a course • Creating a new course State A State B Event

What Are Transitions? ◆ A transition is a change from an originating state to a successor state as a result of some stimulus. The successor state could possibly be the originating state. Atransition may take place in response to an event. Transitions can be labeled with events Event State A State B Transition Object Oriented Analysis and Design 8

Object Oriented Analysis and Design 8 What Are Transitions?  A transition is a change from an originating state to a successor state as a result of some stimulus. ▪ The successor state could possibly be the originating state.  A transition may take place in response to an event.  Transitions can be labeled with events. State A State B Event Transition

Example:Statechart Applied 【accepted] Enrolled 【rejected] First year credits>=28】 Second year ∠fcredits>=56】 Third year Hiatus leave ∠Tcredits>=84】 Fourth year retur H credits>=112] Graduated Object Oriented Analysis and Design 9

Object Oriented Analysis and Design 9 Example: Statechart Enrolled Freshman Sophmore Junior Senior H First year Second year Third year Fourth year Graduated [ credits >= 112 ] Applied [ rejected ] [ accepted ] H [ credits >= 28 ] [ credits >= 56 ] [ credits >= 84 ] Hiatus return leave

Outline ◆Statechart diagrams Deployment diagrams Component diagrams Object Oriented Analysis and Design 10

Object Oriented Analysis and Design 10 Outline  Statechart diagrams  Deployment diagrams  Component diagrams

点击下载完整版文档(PPT)VIP每日下载上限内不扣除下载券和下载次数;
按次数下载不扣除下载券;
24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
共17页,试读已结束,阅读完整版请下载
相关文档

关于我们|帮助中心|下载说明|相关软件|意见反馈|联系我们

Copyright © 2008-现在 cucdc.com 高等教育资讯网 版权所有