Chapter 4 Sequence Diagrams

Slides:



Advertisements
Similar presentations
Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.
Advertisements

Chapter 6: Behavioral Modeling
Introduction to UML Part 2 Behavioral Modeling. Sequence (event) diagram Describes object interaction Typically captures behavior of a single use case.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Dynamic modeling using UML
7M822 UML Interaction Diagrams 25 November 2010.
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.
Unified Modeling Language
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.
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.
Interaction diagrams Sequence and collaboration diagrams.
1 On to Object Design Chapter 14 Applying UML and Patterns.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Lecture 18: Object-Oriented Design – Interaction and State Diagrams Anita S. Malik Adapted from Schach (2004) Chapter 12.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Interaction and Communication Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
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.
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.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
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.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
Interactions.
The Movement To Objects
TIM 58 Chapter 6, continued: Behavioral Modeling
Sequence Diagrams Mimi Opkins CECS 493 Fall2016
Sequence Diagrams.
Chapter 11: Collaboration Diagram - PART1
Unified Modeling Language
COMP 2710 Software Construction Sequence Diagrams (cont.)
Dynamic Modeling of Banking System Case Study - II
Object-Oriented Systems Analysis and Design Using UML
Communication DIAGRAM
University of Central Florida COP 3330 Object Oriented Programming
Behavioral Modeling.
Object-Orientated Analysis, Design and Programming
Sequence Diagrams.
UML dynamic Modeling (Behavior Diagram)
Dynamic Modeling: Defining Classes
Princess Nourah bint Abdulrahman University
Interactions.
Princess Nourah bint Abdulrahman University
UML Overview Part 2.
Classification of UML Diagrams
Sequence Diagrams.
Unified Modeling Language
IMAT5205 Systems Analysis and Design
Week 12: Activity & Sequence Diagrams
Interaction diagrams.
Object Interaction Diagrams
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
Unified Modelling Language
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
UML Interaction diagrams
Interaction Diagrams Chapter 18.
Communication DIAGRAM
Sequence Diagrams.
Presentation transcript:

Chapter 4 Sequence Diagrams

Introduction “Interaction diagrams describe how a group of objects collaborate in some behavior” - M. Fowler Objects communicate with each other by sending messages. Sending a message is another name for a member function call. Some C++ examples of member function calls ... objectName.messageName( ); objectPointer->messageName( ); (*objectPointer).messageName( ); An interaction is a set of messages exchanged among a set of objects in order to accomplish a specific goal.

Introduction Interaction diagrams ... Are used to model the dynamic aspects of a system. Aid the developer visualize the system as it is running. Are storyboards of selected sequences of message traffic between objects. After class diagrams, interaction diagrams are possibly the most widely used diagrams in UML. Interaction diagrams commonly contain objects, links and messages.

Introduction Messages A message is the vehicle by which communication between objects is achieved. A call is the most common type of message. The return of data as a result of a function call is also considered a message. A message may result in a change of state for the receiver of the message. The receipt of a message is considered an instance of an event.

Introduction Interactions model the dynamic aspects of a system by showing the message traffic between a group of objects. Showing the time-ordering of the message traffic is a central ingredient of interactions. Graphically, a message is represented as a directed line that is labeled. The sequence diagram is the most commonly used UML interaction diagram Typically a sequence diagram captures the behavior of a group of objects in a single scenario.

Sequence Diagrams Sequence diagrams are build around an X-Y axis. Objects are aligned (in most cases) at the top of the diagram, parallel to the X axis. Messages travel (in most cases) parallel to the X axis. Time passes from top to bottom along the Y axis. Where a message arrow appears relative to the Y axis and other message arrows, determines the relative time the message is sent. Sequence diagrams most commonly show relative timings, not absolute timings. Links between objects are implied by the existence of a message.

Sequence Diagrams

Sequence Diagrams

Creating and Deleting Participants

Loops, Conditionals, and the Like

Loops, Conditionals, and the Like Using Pre 2.0 notations

CRC Cards

Links and Associations Context Interactions appear whenever an object is linked to another object. Links A link is an instance of an association. Links must exist for interactions to occur. The multiplicity on both ends of a link is 1, since it is an instance of an association.

Links and Associations

Common Modeling Techniques It is impossible to model all possible interactions within a system. Only model those interactions that are interesting or shed light on important aspects of the system. A system of even modest complexity may require several interaction diagrams. It does not matter whether you use interaction or collaboration diagrams to model interactions.

Modeling Control Flow by Time Determine what scenarios need to be modeled. Identify the objects that play a role in the scenario. Lay the objects out in a sequence diagram left to right, with the most important objects to the left. Most important in this context means objects that are the principle initiators of events. Draw in the message arrows, top to bottom. Adorn the message as needed with detailed timing information.