Interaction diagrams Sequence and collaboration diagrams.

Slides:



Advertisements
Similar presentations
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
Advertisements

Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.
Drawing System Sequence Diagrams
Introduction to UML Part 2 Behavioral Modeling. Sequence (event) diagram Describes object interaction Typically captures behavior of a single use case.
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Copyright W. Howden1 Lecture 4: Sequence Interaction Diagrams.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Use Case Diagrams. Use Case Use case A view to system seen from outside(user) User’s requirements on system A set of scenario for an actor to achieve.
SE-565 Software System Requirements More UML Diagrams.
Unified Modeling Language
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Sequence diagrams Chapter 5 Sommerville. Sequence diagrams Sequence diagrams are part of the UML and are used to model the interactions between the actors.
UML Collaboration Diagram. Recap System Sequence Diagrams (SSD) UML for SSD 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.
Modelling Interactions and Behaviour. © Lethbridge/Laganière 2005 Chapter 8: Modelling Interactions and Behaviour2 Interaction Diagrams Interaction diagrams.
Chapter 5 – System Modeling
1 On to Object Design Chapter 14 Applying UML and Patterns.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
UML Diagrams: Sequence Diagrams The Requirements Model, and The Dynamic Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical.
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.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
Chapter 4: UML Interaction Diagrams. Objective Provide a reference for frequently used UML interaction diagram notation- sequence and communication diagrams.
Lecture 18: Object-Oriented Design – Interaction and State Diagrams Anita S. Malik Adapted from Schach (2004) Chapter 12.
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.
The Unified Modeling Language Part II Omar Meqdadi SE 2730 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
 C-style pointer-based arrays  Have great potential for errors and several shortcomings  C++ does not check whether subscripts fall outside the range.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
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.
Interaction Diagram Notation
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 Sequence Diagrams.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Communication Diagrams Lecture 8. Introduction  Interaction Diagrams are used to model system dynamics  How do objects change state?  How do objects.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
 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.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
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.
Basics of RSA Rational Software Architect. What is RSA? Comprehensive Modeling and Development environment that leverages the Unified Modeling Language.
Sequence Diagram Lecture # 1. Sequence Diagram Definition A Sequence diagram is an interaction diagram that shows how the objects and classes involved.
Systems Analysis and Design in a Changing World, Fourth Edition
Sequence Diagrams.
Chapter 11: Collaboration Diagram - PART1
Object-Oriented Systems Analysis and Design Using UML
Sequence Diagram.
Communication DIAGRAM
Sequence Diagrams.
Sequence Diagrams.
Princess Nourah bint Abdulrahman University
Object Oriented Analysis and Design
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
Lecture 4: Sequence Interaction Diagrams
Interaction diagrams.
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
Sequence Diagrams Getting the Message.
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
UML Interaction diagrams
Communication DIAGRAM
UML Interaction Diagrams
Presentation transcript:

Interaction diagrams Sequence and collaboration diagrams

What are interaction diagrams? Interaction diagrams illustrate how objects interact via messages in order to fulfil certain tasks. There are two kinds of interaction diagrams:  collaboration diagrams  sequence diagrams

Collaboration and sequence diagrams: main differences Collaboration diagram illustrates object interactions in a graph or network format, in which objects can be placed anywhere on the diagram. It demonstrates how objects are statically connected. Sequence diagram illustrates interaction in a kind of fence format, in which each new object is added to the right. It generally shows the sequence of events that occur.

Interaction diagrams: when and how to use them? 1. Identify the system events that are implied by the use cases. 2. Make at least one interaction diagram for each system event. 3. Make additional interaction diagrams for alternative courses of events.

Interaction diagrams: notation The following notation is used in the UML for classes and objects:  Class  Instance of a Class (object without a name)  Named instance of a class (named object)  Named object only (shown without class) Perso n :Person michael:Perso n michae l

Types of message flows Synchronous: the sender waits until the responder finishes. Flat: the sender doesn't wait for anything from the responder and finishes its' activity; the control is passed to the responder. Asynchronous: the sender doesn't wait for anything from the responder, but it continues its' own activity.

Collaboration diagrams A collaboration diagram shows the relationship between objects and the order of messages passed between them. The objects are listed as icons and arrows indicate the messages being passed between them. The numbers next to the messages are called sequence numbers and, as the name suggests, they show the sequence of the messages as they are passed between the objects.

Collaboration diagram – an example

Collaboration diagrams – more complex example

Static model based on previous collaboration diagram

Collaboration diagrams – strenghts and weaknesses One of the greatest strengths of collaboration diagrams is their simplicity. The principal weakness, however, is that although they are good at describing behavior, they do not define it. They typically do not show all the iteration and control that is needed to give an computationally complete description.

Sequence diagrams A sequence diagram shows relations between objects. It should be read from left to right and from top to bottom. At the top of the diagram are names of objects that interact with each other. These are the concepts in the conceptual model. When the course of events is initiated by an actor the actor symbol is displayed as the leftmost object.

Sequence diagrams: an example Acto r Instance s of classes

Sequence Diagram: Lifelines :actor :object1:object2 Each object has a lifeline. Time flows from top to down. Time :object3

:actor :object1:object2 Rectangles refer to events that are related to each other. Time :object3 Sequence diagrams: rectangles

Sequence diagrams: messages :object3 :actor :object1:object2 Arrows indicate messages that are sent from one object to another. Time

Sequence diagrams - different types of messages Messag e Feedback arrow shows that a value is returned. An object sends a message to itself.

Sequence diagrams: endpoints X at the end of the lifeline shows that the object ceases to exist.

Sequence diagram: a more complex example

Sequence diagrams - strengths and weaknesses Strengths: - they clearly show sequence or time ordering of messages - the notation is rather simple Weaknesses: - forced to extend to right when adding new objects, consumes a lot of space