Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book

Slides:



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

Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
Jan 15, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration: a simple cash-only success scenario of Process Sale.
Sequence Diagram Objects are represented horizontally across the top of the diagram The first object is typically an Actor, the one who initiates Each.
Sequence Diagram Objects are represented horizontally across the top of the diagram Each object has a lifeline some exist before and/or after some are.
Jan Ron McFadyen1 Consider a simple cash-only Process Sale scenario 1. Customer arrives at a POS checkout with goods and/or services to purchase.
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
Lecture 5a: Sequence Interaction Diagrams CSE 111 Copyright W. Howden1.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
Object Collaborations. Objectives: Object Interaction (cont.) You will be able to:  Use sequence diagrams to detail object interactions.
Modern Systems Analysis and Design Fifth Edition Jeffrey A
UML Sequence Diagrams Reading: UML Distilled Ch. 4, by M. Fowler
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.
Sequence Diagram Tutorial
CS3773 Software Engineering
Class, Sequence and UML Model.  Has actors and use cases.
Interaction diagrams Sequence and collaboration diagrams.
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
UML S EQUENCE D IAGRAMS 1 Dr. Hoang Huu Hanh, OST – Hue University hanh-at-hueuni.edu.vn.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
Group 2 work What is sequence diagram ? What is sequence diagram ? Why do we use it ? Why do we use it ? What is basic notation of SD? What is basic notation.
UML January 26, 2011 CSE 403, Winter 2011, Brun UML Sequence Diagrams.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
1 UML Sequence Diagrams UML Distilled, Third Edition, Chapter 4 M. Fowler.
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.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
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.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Collaboration diagrams. Purpose A collaboration diagram is an alternate way to show a scenario. A collaboration diagram shows the objects and relationships.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Chapter 3: Introducing the UML
CSE 403 Lecture 8 UML Sequence Diagrams Reading: UML Distilled, Ch. 4, M. Fowler slides created by Marty Stepp
 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.
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.
1 Object Oriented Analysis System modeling = Functional modeling + Object modeling + Dynamic modeling Functional modeling = Use cases Object modeling =class.
Sequence Diagram Lecture # 1. Sequence Diagram Definition A Sequence diagram is an interaction diagram that shows how the objects and classes involved.
UML Diagrams By Daniel Damaris Novarianto S..
Sequence Diagram.
UML SEQUENCE DIAGRAM.
Chapter 11: Collaboration Diagram - PART1
Unified Modeling Language
UML UML Sequence Diagrams CSE 403
Object-Oriented Systems Analysis and Design Using UML
Sequence Diagram.
Prepared By Sidra Noureen
Sequence Diagram.
UML Diagrams Jung Woo.
UML Sequence Diagrams.
Project 1 Guide System Analysis & Design
Object Oriented Analysis and Design
Requirements To Design In This Iteration
System Sequence Diagrams
Superior University, Lahore
Interaction diagrams.
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
Unified Modelling Language
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
Chapter 11: Class Diagram
Presentation transcript:

Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book

Sequence diagrams: An Interaction Model Used to model the interactions between the actors and the objects within a system. The objects and actors involved are listed along the top of the diagram, with a dotted line drawn vertically from these. Interactions between objects are indicated by annotated arrows. Detail how operations are carried out Dynamic Diagrams Organized according to time The time progresses as you go down the page The objects involved in the operation are listed from left to right according to when they take part in the message sequence. Create a sequence diagram for each use case scenario

Sequence Diagram (make a phone call) actors and objects Object lifeline

Sequence Diagrams Sequence diagrams show how instance exchange messages. An instance can be: An object, not a class An actor Types of objects in a diagram interface object entity object control object Messages ( ) can be Simple like: One object sends a message to a passive object The sender does not care what happens to the message Messages can be Return messages ( ) Results of procedure calls

Sequence Diagrams Activation: thick box over object's life line; drawn when object's method is on the stack either that object is running its code, or it is on the stack waiting for another object's method to finish nest activations to indicate recursion

Sequence Diagrams Messages have a specific format *[iteration] [Condition] Sequence Number. Return value := MessageName(Arguments) *[iteration] [Condition] Sequence Number. Return value := MessageName(Arguments)

Sequence Diagrams Messages can be Constructors, the message creates the recipient

Sequence Diagrams Messages can be Destructors, the message destroys the recipient.

whose Sender will not be specified Sequence Diagrams A Found message whose Sender will not be specified

Message to “self” or “this” Sequence Diagrams Found Message Message to “self” or “this”

Sequence Diagrams frame: box around part of diagram to indicate if or loop if -> (opt) [condition] if/else -> (alt) [condition], separated by horizontal dashed line loop -> (loop) [condition or items to loop over]

loop If/else If

Creating methods from sequence diagrams :Register :ProductCatalogue Sale :ProductSpec addLineItem(itemID, quantity) 1. Spec=getSpecification(itemID) 1.1 Spec=Find(itemID) 2. makeLineItem(spec,quantity) 2.1 sli= Create(spec,quantity) :SalesLineItem 2.2 Add(sli)

Creating methods from sequence diagrams Lost Message

Sequence diagram for View patient information

Sequence diagram to code

Effective Sequence Diagrams Use only instances and actors Concentrate on actions, not on instance static details Imaging as much real-time scenarios as you can, and model them Keep in mind that a programmer will read your design, so make it as clear as possible. Sequence diagrams contain the same information as Collaboration diagrams, but emphasize the sequence of the messages instead of the relationships between the objects.