FORDHAM CSLU 3598 - chap10b MORE ON UML

Unformatted text preview:

An Introduction to Object-Oriented Systems Analysis and Design with UML and the Unified Process McGraw-Hill, 2004 Stephen R. Schach [email protected] 10 — Unit BStatechartsStatecharts (contd)Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Activity DiagramsActivity Diagrams (contd)Slide 17Slide 18Slide 19PackagesPackages (contd)Component DiagramsComponent Diagrams (contd)Slide 24Deployment DiagramsDeployment Diagrams (contd)Review of UML DiagramsSlide 28UML and IterationSlide 10B.1Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction toObject-Oriented Systems Analysis and Design with UML and the Unified Process McGraw-Hill, 2004Stephen R. [email protected] 10B.2Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. CHAPTER 10 — Unit BMORE ON UMLSlide 10B.3Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. StatechartsStatechart with guardsSlide 10B.4Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)An event also causes transitions between statesExample: The receipt of a messageSlide 10B.5Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)The elevator is in state Elevator Moving–It performs operation »Move up one floorwhile guard [no message received yet] remains true, until it receives the message »Elevator has arrived at floorSlide 10B.6Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)Receipt of this message (event) causes the guard to be falseIt also enables a transition to state Stopped at Floor–In this state, activity »Open the elevator doorsis performedSlide 10B.7Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)The most general form of a transition label is»event [guard] / action–If »eventhas taken place and »[guard]is true, the transition occurs, and, while it is occurring, »actionis performedSlide 10B.8Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)Equivalent statement with most general transitionSlide 10B.9Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)The transition label is–Elevator has arrived at floor [a message has been received] / Open the elevator doorsThe guard–[a message has been received]is true when the event–Elevator has arrived at floorhas occurred and the message has been sentThe action to be taken is –Open the elevator doorsSlide 10B.10Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)There are two places where an action can be performed in a statechart–When a state is entered»Activity–As part of a transition»ActionSlide 10B.11Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)An event can be specified in terms of words like “when” or “after”Example: – When (cost > 1000) or after (2.5 seconds)Slide 10B.12Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)Superstates combine related statesSlide 10B.13Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Statecharts (contd)States A, B, C, and D all have transitions to Next StateCombine them into superstate ABCD Combined–Now there is only one transition–The number of arrows is reduced from four to only oneStates A, B, C, and D all still exist in their own rightSlide 10B.14Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Example: Four states are unified into MSG CombinedStatecharts (contd)Slide 10B.15Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity DiagramsActivity diagrams show how various events are coordinated–Used when activities are carried on in parallelExample: –One diner orders chicken, the other fish–The waiter writes down their order, and hands it to the chef–The meal is served only when both dishes have been preparedSlide 10B.16Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd)Example:Slide 10B.17Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd)A fork has –One incoming transition, and –Many outgoing transitions, each of which starts an activity to be executed in parallel with the other activitiesA join has–Many incoming transitions, each of which lead from an activity executed in parallel with the other activities, and –One outgoing transition that is started when all the parallel activities have been completedSlide 10B.18Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd)Example: A company that assembles computers as specified by the customerSlide 10B.19Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Activity Diagrams (contd)The three departments involved–Assembly Department–Order Department–Accounts Receivable Departmentare each in their own swimlaneSlide 10B.20Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. PackagesA large information system is decomposed into relatively independent packagesUML notation for a packageSlide 10B.21Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Packages (contd)Example showing the contents of My PackageSlide 10B.22Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Component DiagramsA component diagram shows dependencies among software components, including –Source code–Compiled code–Executable load imagesSlide 10B.23Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Component Diagrams (contd)Example:–Programmers write source code in an object-oriented language »C++ or Java–The source code is translated by a compiler into compiled code»(The binary code that is the only language a computer understands)–The compiled code for each module is combined with run-time routines to produce an executable load image (that is, a program)Slide 10B.24Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Component Diagrams (contd)Example:Slide 10B.25Copyright © 2004 by The


View Full Document
Download chap10b MORE ON UML
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view chap10b MORE ON UML and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view chap10b MORE ON UML 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?