Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.

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

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.
1 Chapter 4 Dynamic Modeling and Analysis (Part I) Object-Oriented Technology From Diagram to Code with Visual Paradigm for UML Curtis H.K. Tsang, Clarence.
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control Information Examples.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Sequence Diagrams2 Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Sequence Diagrams2 Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control.
SE-565 Software System Requirements More UML Diagrams.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
Object-Oriented Analysis and Design
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.
CS3773 Software Engineering
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
1 CSC 450 Slides adapted from slides created by Robert B. France UML Behavioral Models.
UML / UML 2.0 Diagrams (Part III) 1. Sequence diagram is the most common kind of interaction diagram. It focuses on the message interchange between a.
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.
1 Behavioral diagrams (2) Lecture p5 T120B pavasario sem.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
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.
1 Interaction diagrams and activity diagrams Speaker: 陳 奕 全 Real-time and Embedded System Lab 15 August 2002.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 02. Objects,
9-1 © Prentice Hall, 2004 Chapter 9: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
9-1 © Prentice Hall, 2007 Chapter 9: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
University of Toronto at Scarborough © Bennett, McRobb and Farmer 2005 CSCC40 communication and sequence diagrams : listCampaigns *[For.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
10 October, 2007Information System Design IT60105, Autumn 200 Information System Design IT60105 Lecture 17 Collaboration Diagrams.
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”
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
(14-2) UML Instructor - Andrew O’Fallon CptS 122 (December 2, 2015) Washington State University.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
7-1 © Prentice Hall, 2007 Topic 7: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
© Bennett, McRobb and Farmer Object Interaction – Sequence Diagrams Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
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.
1 Kyung Hee University Interaction Diagrams Spring 2001.
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.
UML Activity and Sequence Diagrams David Millard
Appendix 3 Object-Oriented Analysis and Design
Analysis Classes Unit 5.
Systems Analysis and Design in a Changing World, 6th Edition
Sequence Diagram.
Sequence Diagram.
Business System Development
Princess Nourah bint Abdulrahman University
Interactions.
UML Sequence Diagrams.
Object Oriented Analysis and Design
Princess Nourah bint Abdulrahman University
System Sequence Diagrams
Sequence Diagrams.
Systems Analysis and Design in a Changing World, 6th Edition
IMAT5205 Systems Analysis and Design
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
Sequence Diagrams Getting the Message.
Unified Modelling Language
Interaction Diagrams A Lot of UML!
UML Interaction diagrams
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

Sequence diagrams Lecture 5

Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame of interaction use  Operators of interactions

Interaction diagrams  The interaction is described by the following types of diagrams: sequence diagram and communication (cooperation) diagram  Sequence diagrams can (and should!) be used to detail the use cases for more detailed description of the logic of usage scenarios.  Sequence diagrams contain objects, messages and return results related to communications.

Example of a sequence diagram

Communication diagram  It is equivalent to the sequence diagram  Ascent is not on the time of interaction (as it is on the sequence diagram), but on the structure of connections between objects.  Position of the elements does not matter. In order to show the order of messages in time a hierarchical decimal numbering is applied.

Example of a communication diagram

Main terms

Types of messages a)Call of procedures, executable operations b)Asynchronous message, which is sent at any moment, accompanied by the getting of focus of the object. Sometimes is represented by the line with a half of the arrow c)Return from the call of procedure (end of calculations without result)

Example of different types of messages

Types of messages  Synchronous message (synchCall) – corresponds to a synchronous call operation and waits for a respond from the recipient object. While the response is not received, no actions perform in a system.  Asynchronous message (asynchCall) – corresponds to a asynchronous call operation and means that the object can continue its work without waiting the response.  Response message (reply) – the response message from the called method. This type of message is shown in a diagram as necessary.  Lost message (lost) – message, which doesn’t have the recipient, i.e. there is the event of submit and there is not the event of admission  Found message (found) – message, which doesn’t have the initiator of the message, i.e. there is not the event of submit and there is the event of admission

Stereotypes of messages  "call" – message requiring call of operation and procedure of the recipient object  "return" – message, returning the value of the performed operation or procedure to the object, which caused the operation  "create" – message, requiring the creation of another object for performing definite actions  "destroy" – message with explicit requirement to destroy a corresponding object  "send" – denotes the sending of some signal, which asynchronously initiates by one object and received by another object

Time constraints  Duration Constraint – minimum and maximum value of duration of message sending  Duration Constraint Between Messages – constraint of duration of waiting between sending and receiving of a message  Duration Observation – interception of message duration  Timing Constraint – time interval, while which the message must reach the target (set at the side of the receiver)  Timing Observation – time interception when the message was sent

Example of time constraints

Interaction operators  Definite fragments of interaction diagrams can be allocated in a frame. Frame must contain the label of interaction operator:  Alt – several alternative fragments; only that fragment executes, whose condition is true  Opt – not required, optional fragment; it executes only if the condition is true. It is equivalent the alt with one branch

Interaction operators  par – parallel; all fragments executes in parallel  loop – loop; fragment can execute several times; you can specify minimum and maximum number of iterations. You must specify the condition of repetition  region – critical region; fragment can have only one flow, executed at one time  neg – negative fragment; means wrong interaction

Interaction operators  ref – reference; references to the interaction, specified in another diagram. You can determine parameters and returned values  Sd - sequence diagram; used to outline the whole diagram

Example of a frame

Implementation of use cases 1.Textual descriptions  Simple, understandable, easily and quickly made  Often incomplete and inaccurate 2.Pseudo code  Familiar, understandable to any developer  Badly consistent with object-oriented programming  Lost visibility of UML  Cannot be reused

Implementation of use cases 3.Activity diagrams  Can lead to deeper understanding of the problem  Can open abilities for improvement of application  Can lead to change and improvement of implemented use case  Does not close to the final aim – source code

Implementation of use cases 4.Sequence diagrams  Most consistent to methodology UML  Always leads to determination of several classes (because objects interacts) and some of their operations (because messages “call” are defined).  Matches the OOP paradigm. There are a lot of CASE tools can convert to program code.  Allow to describe the protocol only, but not the algorithm! What to do? Draw several sequence diagrams. Each will show one scenario, all together gives the representation of the whole use case