Interactions.

Slides:



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

Chapter 6: Behavioral Modeling
Session 18 Modeling the Dynamic View: The Collaboration Diagram Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 20, 2011 Presented.
Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together to achieve some functionality.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
L28-S1 Interaction Diagrams 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Sequence Diagrams By Zvika Gutterman Adam Carmi. Sequence Diagrams2 Agenda Interaction Diagrams A First Look at Sequence Diagrams Objects Messages Control.
7M822 UML Interaction Diagrams 25 November 2010.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of 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.
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.
Copyright © Hsiao-Lan Wei All Rights Reserved Design Model Interaction diagram.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
Sequence diagram in UML Martin Palkovik. Sequence diagram  It is a graphic representation of system operations based on chronology - a time sequence.
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.
Interaction Diagram Notation
Object-Oriented Analysis and Design 1 Mira Balaban & Arnon Sturm Object-Oriented Analysis and Design Session 3a: Behavioral Modeling - Interactions.
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.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
ITEC1301 Object-Oriented Systems Construction Lecture Notes #4 1.
Systems Analysis and Design in a Changing World, Fourth Edition
UML Diagrams By Daniel Damaris Novarianto S..
Collaboration Diagrams
TIM 58 Chapter 6, continued: Behavioral Modeling
Sequence Diagrams Mimi Opkins CECS 493 Fall2016
Sequence Diagrams.
Chapter 11: Collaboration Diagram - PART1
Unified Modeling Language
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
UML Diagrams Jung Woo.
Behavioral Modeling.
Sequence Diagrams.
UML dynamic Modeling (Behavior Diagram)
Princess Nourah bint Abdulrahman University
Interactions.
Software System Engineering
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
System Sequence Diagrams
Object-Oriented Analysis & Design
UML Overview Part 2.
Classification of UML Diagrams
Sequence Diagrams.
IMAT5205 Systems Analysis and Design
Week 12: Activity & Sequence Diagrams
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.
Behavioral Diagrams P. P. Mahale
Software System Engineering
Chapter 4 Sequence Diagrams
Presentation transcript:

Interactions

Introduction 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 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.

Introduction

Terms and Concepts Context Links 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

Terms and Concepts 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.

Sequence Diagram

Terms and Concepts Sequencing A sequence of messages is rooted in some process, thread or hardware event. A sequence will continue as long as the process that started it lives. Messages in sequence are ordered by time.

Terms and Concepts Creation, Modification, and Destruction There are three predefined stereotypes that can adorn an interaction for purposes of showing the life span of a link or, more commonly, the life span of an object participating in the link. <<new>> -- interaction results in the creation of a new object. <<destroyed>> -- interaction results in the destruction of an existing object. <<transient>> -- link will be destroyed before the completion of the interaction.

Terms and Concepts Representation Interactions are be modeled using interaction diagrams. There are two types of interaction diagrams. Sequence diagrams emphasize the time ordering of the interactions. Collaboration diagrams emphasize the structural organization of the objects participating in interactions. Both types convey the same information, but with a different emphasis. The type of diagram used is largely a matter of personnel preference.

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.

Sequence / Collaboration Diagram Comparison

Sequence / Collaboration Diagram Comparison

Interaction Diagrams

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 the most widely used diagrams in UML. Interaction diagrams commonly contain objects, links and messages.

Introduction There are two types of interaction diagrams … Sequence diagrams emphasize the time ordering of message traffic between objects. Collaboration diagrams emphasize the structural relationships between objects that send and receive messages. Both types of diagrams are semantically equivalent and can easily be converted from one format to the other. See figure 18-1, page 245.

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

Collaboration Diagrams A collaboration diagram is a graph where the objects (vertices) are connected by links (arcs). Each link is adorned with the relevant message traffic that can travel across the link. Each message is assigned a sequence number to show the time order of the message. The sequence number may be prefixed with an expression to show iteration.

Collaboration Diagrams

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.

Modeling Control Flow by Time

Modeling Control Flow by Organization Determine what scenarios need to be modeled, then identify the objects that play a role in the scenario. Place the most important objects in the center of the diagram. Place links between the appropriate objects. Draw message arrows next to the appropriate links. Number the message arrows to show time ordering of messages.

Modeling Control Flow by Organization