Www.ddss.arch.tue.nl 7M822 UML Interaction Diagrams 25 November 2010.

Slides:



Advertisements
Similar presentations
UML Use Case Diagram / Use Case Text / Activity Diagram
Advertisements

1 Behavioral Modeling Chapter 8. 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports business processes.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
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.
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.
7M701 1 Activity Diagram. 7M701 2 Example 7M701 3 Activity Diagram: what is it? Describes activities and flows of data or decisions between activities.
Assess A Claim Object Interaction Diagrams. Object sequence Diagrams - Use case Sequence of events that occur during one particular execution of a system.
Software Engineering COMP 201
Slide 1 Systems Analysis & Design CS183 Spring Semester Dr. Jonathan Y. Clark Course Website:
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
7M822 UML Sequence Diagrams 2 December 2010.
Essentials of interaction diagrams Lecture 23 & 24.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Class Diagram & Object Diagram
Use Case Modelling.
7M822 UML Activity Diagrams 6 October 2008.
© Copyright Eliyahu Brutman Programming Techniques Course.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
SE-565 Software System Requirements More UML Diagrams.
7M822 UML Sequence Diagrams 5 October 2009.
An Introduction to Rational Rose Real-Time
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. Overview of UML Diagrams Structural : element of spec. irrespective of time Class Component Deployment Object Composite structure Package Behavioral.
Unified Modeling Language
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
2005/05/25 Unified Modeling Lanauage 1 Introduction to Unified Modeling Language (UML) – Part One Ku-Yaw Chang Assistant Professor.
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.
Class, Sequence and UML Model.  Has actors and use cases.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Behavioral Modeling Chapter 8.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
TAL7011 – Lecture 4 UML for Architecture Modeling.
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.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Chapter 7 The Object-Oriented Approach to Requirements.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
Design Jon Walker. More UML ● What is UML again?
UML Diagrams CSC 422 Kutztown University Dr. Daniel Spiegel.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Software Engineering Lecture 8 Object-Oriented Analysis.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
 Building Block Building Block  Things in the UML Things in the UML  Structural Things Structural Things  Behavioral Things Behavioral Things  Grouping.
Chapter 3: Introducing the UML
Introduction to UML Hazleen Aris Software Eng. Dept., College of IT, UNITEN. …Unified Modeling Language.
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.
Chapter 7 Behavioral Modeling Brandon A. Jones Stand and Deliver ITEC March 6, 2011.
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
1 Systems Analysis and Design Behavioral Modeling Chapter 8 (Last one before the Midterm!)
Systems Analysis and Design in a Changing World, Fourth Edition
Embedded Systems Software Engineering
Interactions.
Course Outcomes of Object Oriented Modeling Design (17630,C604)
Sequence Diagrams.
Unified Modeling Language
Sequence Diagrams.
UML dynamic Modeling (Behavior Diagram)
Interactions.
Interaction diagrams.
CIS 375 Bruce R. Maxim UM-Dearborn
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
CIS 375 Bruce R. Maxim UM-Dearborn
Chapter 4 Sequence Diagrams
Presentation transcript:

7M822 UML Interaction Diagrams 25 November 2010

7M822 UML Views Logical view Concurrency view Component view Deployment view Use Case view 2

7M822 Behaviour modelling Behaviour models are used to describe the overall behaviour of the system. Objects interact to implement behaviour. This interaction can be described in two complementary ways, one of them is centred on individual objects and the other on a collection of cooperating objects. 3

7M822 UML Diagrams Structure diagram –Class diagram –Object diagram –Component diagram –Deployment diagram –Package diagram Behaviour diagram –Use Case diagram –Activity diagram –Interaction diagram Sequence diagram Communication diagram 4

7M822 UML Diagrams Structure diagram –Class diagram –Object diagram –Component diagram –Deployment diagram –Package diagram Behaviour diagram –Use Case diagram –Activity diagram –Interaction diagram Sequence diagram Communication diagram 5

7M822 Interactions 1 of 2 An interaction is a behavior that comprises a set of messages exchanging among a set of objects with a context to accomplish a purpose. Interactions are used to model the dynamic aspect of collaborations, representing societies of objects playing specific roles, all working together to carry out some behavior that’s bigger than the sum of the elements. 6

7M822 Interactions 2 of 2 Roles, links, messages, actions, and sequences Modeling flows of control Each interaction can be modeled in two ways: –by emphasizing its time ordering of messages, or –by emphasizing its sequencing of messages in the context of some structural organization of objects. 7

7M822 In a nutshell: what are interactions? A collection of communications between instances, including all ways to affect instances, like operation invocation, as well as creation and destruction of instances The communications are partially ordered (in time) 8

7M822 Interaction Diagram Guide Show interactions between instances in the model –graph of instances (possibly including links) and stimuli –existing instances –creation and deletion of instances Kinds –Sequence diagram (temporal focus)  –Communication diagram (structural focus) 9

7M822 Interaction Diagrams 10 xyz Sequence Diagram a b c Communication Diagram xy z 1.1: a 1.2: c 1.1.1: b

7M822 Sequence Diagram 11

7M822 Different Kinds of Arrows 12

7M822 Lifeline & Messages The vertical line is called the object’s lifeline. The lifeline represents the object’s life during the interaction. Each message is represented by an arrow between the lifelines of two objects. The order in which these messages occur is shown top to bottom. Each message is labeled at minimum with the message name; also arguments and some control information can be included. A self-back is a message that an object sends to itself, by sending the message arrow back to the same lifeline. 13

7M822 Communication Diagram 14

7M822 Sequence Diagram / Communication Diagram 15

7M822 Sequence Diagram vs. Communication Diagram Sequence diagrams are used when you want to look at the behavior of several objects within a single use case. Sequence diagrams are good at showing collaborations among the objects. Communication diagrams emphasize the data links between the various participants in the interaction. With communication diagrams we can show how the participants are linked together. 16

7M822 Elements Sequence Diagrams 17

7M822 Next Concepts Sequence Diagrams 1of2 18 control guard

7M822 Next Concepts Sequence Diagrams 2of2 19 { a b-a < 5 sec b b'-b < 1 sec b' } constraint

7M822 Sequence Diagram – an Example A sequence diagram captures the behaviour of a scenario. The diagram shows a number of objects and the messages that are passed between these objects within the use case. A sequence diagram shows a set of messages arranged in time sequence. 20

7M822 NS Ticket service Take ticket Destination 21

7M822 Class diagram of ‘NS ticket service’ including the classes ‘Ticket’ and ‘Destination’ 22

7M822 NS Ticket machine – use case text Use Case Buy OV Ticket Actors Traveller Preconditions Traveller has a valid pass Description 1.Ticket device expects destination code 2.Traveller enters destination code 3.Extension point: NS ticket 4.Ticket device checks code and calculates the charge. Shows destination code & fare. Activates ticket machine for paying 5.Traveller pays (use case: Pay ticket) 6.Ticket device print and supplies ticket 7.Traveller takes ticket Extension Destination code = NS station. 3a. Ticket device expects ticket type 3b. Traveller enters Single/Return, Discount Y/N, Class Exceptions Traveller interrupt the interaction or walk away Traveller enters an incorrect destination code Payment is not finished off successful Result Traveller has ticket. (NS can look forward to the payment) 23

7M822 Sequence diagram – Buy ticket 24

7M822 Elevator Example Scenario User pressed floor button Elevator system detects floor button pressed Elevator moves to floor Elevator open doors User gets in and press elevator button Elevator moves to required floor Elevator open doors User gets out Elevator close doors 25