Sequence and Collaboration Diagrams

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

SEQUENCE DIAGRAM. UML diagrams There are many ways of organizing the UML diagrams. Can be organized as the fallowing: 1. Structural diagrams: to show.
Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
System Sequence Diagrams
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
COMPONENT DIAGRAM in UML 2.0 Veronica Carrega
Drawing System Sequence Diagrams
Systems Analysis and Design in a Changing World, Fourth Edition
Essentials of interaction diagrams Lecture 23 & 24.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Dynamic modeling using UML
SE-565 Software System Requirements More UML Diagrams.
LECTURE 5 SEQUENCE DIAGRAM 1. INTRODUCTION – SYSTEM SEQUENCE DIAGRAM A system sequence diagram is a fast and easily created artifact that illustrates.
Chapter 7: The Object-Oriented Approach to Requirements
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
CS3773 Software Engineering
Interaction diagrams Sequence and collaboration 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.
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.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
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.
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.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour UML Sequence Diagram.
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Object Oriented Analysis and Design Sequence Diagrams.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Systems Analysis and Design in a Changing World, Fourth Edition
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.
 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.
1 Kyung Hee University Interaction Diagrams Spring 2001.
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
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.
Systems Analysis and Design in a Changing World, Fourth Edition
Appendix 3 Object-Oriented Analysis and Design
UML Diagrams By Daniel Damaris Novarianto S..
Course Outcomes of Object Oriented Modeling Design (17630,C604)
COMPONENT & DEPLOYMENT DIAGRAMS
Sequence Diagrams.
M.M. Pickard, PhD A Primer on Use Cases (Reference: UML Superstructure Specification, v2.1.1)
Communication DIAGRAM
Sequence Diagram.
UML Diagrams Jung Woo.
UML PPt by: Hong Qing Yu.
Sequence Diagrams.
The Process of Object Modeling
Business System Development
Sequence Diagrams.
Object Oriented Analysis and Design
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
Sequence Diagrams Lecture 6.
IMAT5205 Systems Analysis and Design
Week 12: Activity & Sequence Diagrams
Interaction diagrams.
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
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.
Communication DIAGRAM
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

Sequence and Collaboration Diagrams University of Sunderland

Purpose Used to describe how subsystems and objects interact to produce the behavior of the system. Provide complementary representations of the same information. You can convert from sequence diagrams to collaboration diagrams by considering the association roles. Collaboration diagrams are the starting point for generating the object and class diagrams. Collaboration diagrams are renamed communication diagrams in UML 2.

Recommended Texts Key text: Stevens and Pooley, 2000, Using UML, updated edition, Addison-Wesley, ISBN 0-201-64860-1. Reference text: Alhir, 1998, UML in a Nutshell, O’Reilly, ISBN: 1-56592-448-7. (The basis for much of these lectures.) Advanced text: Graham, 2001, Object-Oriented Methods, 3rd edition, Addison-Wesley, ISBN 0-201-61913-X. Several articles are provided—explore them thoroughly in tutorial and at home!

Sequence Diagram Notation Sequence diagrams contain the following: Class roles (subsystem/object/class, actor, and external system roles in the interaction). These are (usually) drawn across the top of the diagram. Lifelines (subsystem/object/class existence). These (usually) extend down the diagram. Activations (show when the subsystem/object/class is doing something) Messages (communication between roles)

Technique for Construction Specify behavior List class roles Draw lifelines Identify activations Identify messages Iterate

Sample Sequence Diagram Role1 Role2 Role3 Role4 Class Role Activation Message Lifeline Recursive Activation

Class Roles Notation is a rectangle containing RoleName:ClassName (both underlined) Can be an interface instead of class. May have a number in the upper right hand corner giving the number of instances involved. Represents an object, class, actor (person), subsystem or external system.

Lifelines Dashed or dotted line from past to future or from birth to death if a role with a limited lifespan. Death is marked with a large May split and merge to represent alternative paths. E.g.,

Activation Shown by a box over a lifeline Represents an active role May call itself recursively

Messages } paired Denoted by labeled horizontal arrows If simply an arrow, represents flow of control. If shown as: represents a handshake (e.g., TCP). If with a half-arrowhead, asynchronous (e.g., UDP): If at an angle rather than horizontal, represents a time delay: } paired

Collaboration Diagram Notation Forms a context for interactions May realize use cases May be associated with operations May describe the static structure of classes Collaboration diagrams contain the following: Class roles (subsystems/objects/classes/actors/ external systems) as before. Association roles (pathways or links over which messages flow) Message flows (messages sent between class roles)

Technique for Construction Specify behavior. List class roles. Identify association roles. Define message flows Iterate

Sample Collaboration Diagram A Class Role An Anonymous Role RoleName: ClassName :ClassName A Message An Association Role :ClassName

Association Roles Often classes Define the interaction between class roles. Multiplicities defined if the Class Roles represent sets of objects Role-Name:Association-Name Multiplicity Multiplicity

Message Flows Sequence numbers on every message. These can be nested to associate related messages. Arrows are the same as those used in sequence diagrams.