1 © Wolfgang Pelz 2000-04UML2 UML Part Two. 2 © Wolfgang Pelz 2000-04UML2 Chapters Four & Twelve Interaction Diagrams.

Slides:



Advertisements
Similar presentations
© 2005 by Prentice Hall Appendix 3 Object-Oriented Analysis and Design Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George.
Advertisements

Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Drawing System Sequence Diagrams
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control Information Examples.
1 © Wolfgang Pelz UML2 UML Part 3. 2 © Wolfgang Pelz UML2 Chapter Ten State Machine Diagrams.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Sequence Diagrams2 Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control.
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
SE-565 Software System Requirements More UML Diagrams.
1 Lab Beginning Analysis and Design 4 Completion of first version of use case diagram initiates the processes of analysis and design. 4 UML provides.
UML Sequence Diagrams Reading: UML Distilled Ch. 4, by M. Fowler
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Sequence Diagram Tutorial
CS3773 Software Engineering
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD Examples.
Interactions. 2 Objects communicate with each other by sending messages. Sending a message is another name for a member function call. –Some C++ examples.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
1 CSC 450 Slides adapted from slides created by Robert B. France UML Behavioral Models.
1 SAD2 - UML 2 nd Lecture Sequence Diagram and other dynamic views Lecturer: Dr Dimitrios Makris
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
UML S EQUENCE D IAGRAMS 1 Dr. Hoang Huu Hanh, OST – Hue University hanh-at-hueuni.edu.vn.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 9: Interaction.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
Starting Object Design
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
UML January 26, 2011 CSE 403, Winter 2011, Brun UML Sequence Diagrams.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
1 UML Sequence Diagrams UML Distilled, Third Edition, Chapter 4 M. Fowler.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
1 An Introduction to UML Interaction (Sequence and Communication) Diagrams Georgia State University CIS 3300 Spring, 2009.
Drawing System Sequence Diagrams
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
Observations so far…. In general… There are two ways to design a software system –Centralized control One “driver” function that contains the entire algorithm.
Chapter 3: Introducing the UML
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
 The Sequence Diagram models the collaboration of objects based on a time sequence.  It shows how the objects interact with others in a particular scenario.
1 Kyung Hee University Interaction Diagrams Spring 2001.
More on UML 1. 1.Use-case diagram 2.Class diagram [Object diagram] (static) 1.1 Domain/analysis model – of reality 1.2 Design model – of decisions 3.
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
Project 2: Phase 1 Submission 7 Late submissions 10% 10 No submissions 14% Better than project 1 phase 3 submissions 10-point bonus: If you catch the deadline.
Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.
UML Interaction Diagrams
UML SEQUENCE DIAGRAM.
Chapter 11: Collaboration Diagram - PART1
Sequence Diagram.
Business System Development
Sequence Diagrams.
UML Sequence Diagrams.
System Sequence Diagrams
Interaction diagrams.
Sequence Diagrams Getting the Message.
Unified Modelling Language
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Interaction Diagrams A Lot of UML!
UML Interaction diagrams
Appendix 3 Object-Oriented Analysis and Design
Chapter 4 Sequence Diagrams
Presentation transcript:

1 © Wolfgang Pelz UML2 UML Part Two

2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams

3 © Wolfgang Pelz UML2 Interaction Diagrams models that describe how groups of objects interact (collaborate) class and use case diagrams are useful at capturing the structural nature of a system design in a generalized way interaction diagrams capture dynamic behavior applicable to timing or sequencing requirements

4 © Wolfgang Pelz UML2 Use Case & Interaction Diagrams scenario - a specific instance of a use case, that is, a particular path through system functionality a single use case represents many related yet distinctly different scenarios typically, an interaction diagram captures the behavior of a single scenario Two forms of interactive diagrams: sequence and collaboration/communication

5 © Wolfgang Pelz UML2 Sequence boxes at the top are participants (objects); vertical lines are time lines; horizontal directed lines are messages; unless specifically noted, only sequence (location on the time line) is important, not exact times an activation rectangle in the lifeline indicates a focus of control (activation) during which an object is performing an action, either directly or through another object

6 © Wolfgang Pelz UML2 Notation (UML 1)

7 © Wolfgang Pelz UML2 Sequence Diagram Example

8 © Wolfgang Pelz UML2 Some Elaborations Usually objects have concurrent life spans so they are aligned at the diagram’s top. If an object is created, its lifeline starts with the receipt of a > message. Destruction can be explicitly noted with X. Sequence diagrams are good at visualization of how objects interact, but not good at showing details of algorithms, such as loops.

9 © Wolfgang Pelz UML2 Another Sequence Example

10 © Wolfgang Pelz UML2 Some More Elaborations Messages are function calls in traditional programming and events in event-driven programming. Messages may carry parameters. A dished line indicates a return, used to carry a return message or just indicate the end of a group of sub-actions. Self-call: sending messages to one self (message lines direct back to the same life line) Found messages: messages not originated from any participants. Synchronous messages: messages return only when done, block the flow of execution, no more messages from the same participant until a synchronous message is done. Asynchronous message: messages returns immediately, do not block the flow of execution. Guards are conditional expressions in square.

11 © Wolfgang Pelz UML2 … and Another

12 © Wolfgang Pelz UML2 alternatives in Sequence Diagrams

13 © Wolfgang Pelz UML2 Time Constraints

14 © Wolfgang Pelz UML2 Some More Elaborations Centralized control: one participants doing all the processing (traditional sequential programming). Distributed control: processing is split among many participants (OOP and event- driven).

15 © Wolfgang Pelz UML2 Notations (UML 2) A participant was just an object in UML 1, but can be more than that (e.g. a group of objects) in UML 2. No more underline below the name in UML 2. : needs to be there with the class name in UML 2. aParticipant:Class :Class aParticipant

16 © Wolfgang Pelz UML2 Interaction Frames New in UML2 Notations for loops, conditions and other detail algorithms. Common operators for Interactive Frames: alt (alternative), opt (optional), par (parallel), loop (loop), region (critical region), neg (negative), ref (reference), sd (sequence diagram).

17 © Wolfgang Pelz UML2

18 © Wolfgang Pelz UML2 Collaboration (UML 1.x) Communication (UML 2.x) –an interaction diagram that utilizes message numbering instead of a time line; emphasizes structural organization of objects that send and receive messages

19 © Wolfgang Pelz UML2 Sequence Example (again)

20 © Wolfgang Pelz UML2 Corresponding Collaboration Diagram

21 © Wolfgang Pelz UML2 Which to Use? Choose sequence diagram when only the sequence of events needs to be shown and collaboration among the objects are priority. Choose a collaboration/communication diagram when the objects and their links facilitate understanding the interactions (you don’t have to put all objects at the top and make the lines all vertical or horizontal). Collaboration diagrams have relatively fixed notation and numbering scheme.

22 © Wolfgang Pelz UML2 Links and Messages

23 © Wolfgang Pelz UML2 Parameters and Return Values

24 © Wolfgang Pelz UML2 Iteration and messages to “this”

25 © Wolfgang Pelz UML2 Message Sequencing

26 © Wolfgang Pelz UML2 Threads and Mutual Exclusion Letters in the numbering indicate different threads of control. Threads can be mutual exclusive if they are guarded by exclusive conditions.

27 © Wolfgang Pelz UML2 Mutually Exclusive Paths

28 © Wolfgang Pelz UML2 Sequence Diagram

29 © Wolfgang Pelz UML2 Corresponding Collaboration Diagram

30 © Wolfgang Pelz UML2 Another Collaboration Diagram

31 © Wolfgang Pelz UML2 Exercise Draw the sequence diagram corresponding to the previous collaboration diagram

32 © Wolfgang Pelz UML2 Making a Collaboration/Communication Diagram create a separate diagram for each system operation under development if the diagram doesn’t fit on an ordinary sheet of letter paper (A size), split into small diagrams Flat numbering (1,2,3..)is easy to keep track. Nested numbering ( , ) can be confusing. use design by contract and use case descriptions to design a system of collaborating objects

33 © Wolfgang Pelz UML2 Other Notations {tagged value} - in a class - a property either predefined or defined by the user to hold additional information about elements {constraint} - outside a class - applied to the role of the link active object - executes concurrently with its own thread of control