Superior University, Lahore

Slides:



Advertisements
Similar presentations

Advertisements

Object-Oriented Analysis and Design CHAPTERS 15: UML INTERACTION DIAGRAMS 1.
System Sequence Diagrams
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Ana M. Fernández  A UML diagram that depicts: ◦ interactions between objects. ◦ how the business currently works by showing how various.
Introduction to Software Engineering 7. Modeling Behaviour.
UML Class and Sequence Diagrams Violet Slides adapted from Marty Stepp, CSE 403, Winter 2012 CSE 403 Spring 2012 Anton Osobov.
CSE 331 SOFTWARE DESIGN & IMPLEMENTATION UNIFIED MODELING LANGUAGE (UML) Autumn 2011
Summary Class responsibility cards can be used to help allocate responsibilities between different classes. The use of stereotype classes, such as entity,
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.
Lab 6 CPIT 250 System Analysis and Design.
Analysis Modeling Dynamic Modeling. Requirements analysis Results in static and dynamic models – Scenario models: use cases (static), swimlane diagrams.
SE-565 Software System Requirements More UML Diagrams.
Coming up: Interaction Diagrams
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 Diagram Tutorial
CS3773 Software Engineering
1 SAD2 - UML 2 nd Lecture Sequence Diagram and other dynamic views Lecturer: Dr Dimitrios Makris
Sequence 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.
System Sequence Diagrams. Recap When to create SSD? How to identify classes/instances? Use case descriptions UML notations for SSD.
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 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.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck.
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.
Design Jon Walker. More UML ● What is UML again?
Object Oriented Analysis and Design Sequence Diagrams.
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”
Coming up: Interaction Diagrams Sequence Diagrams Dan Fleck.
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.
Sequence diagrams Lecture 5. Main terms  Interaction  Life line  Activation  Executable behavior and derived behavior  Messages  Trajectory  Frame.
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.
UML Modeling Sequence diagram
Unified Modeling Language
UML UML Sequence Diagrams CSE 403
Object-Oriented Systems Analysis and Design Using UML
Sequence and Collaboration Diagrams
Sequence Diagram.
Prepared By Sidra Noureen
Sequence Diagram.
UML Diagrams Jung Woo.
Analysis Modeling Dynamic Modeling.
Business System Development
UML Sequence Diagrams.
Object Oriented Analysis and Design
IMAT5205 Systems Analysis and Design
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Interaction Diagrams A Lot of UML!
UML Interaction diagrams
Use Case Model Use case diagram – Part 2.
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

Superior University, Lahore UML Sequence Diagrams Presented By Tahir Mahmood Lecturer, CS & IT Superior University, Lahore

UML sequence diagrams Sequence diagram: An "interaction diagram" that models a single scenario executing in the system perhaps 2nd most used UML diagram (behind class diagram)

UML sequence diagrams model the flow of logic within your system in a visual manner. Enable you to document and validate your logic, and are commonly used for both analysis and design purposes.

Key parts of a sequence diag. participant: an object or entity that acts in the sequence diagram message: communication between participant objects the axes in a sequence diagram: horizontal: which object/participant is acting vertical: time (down  forward in time)

Sequence diag. from use case

Representing objects squares with object type, optionally preceded by object name and colon write object's name if it clarifies the diagram object's "life line" represented by dashed vert. line

Messages between objects message (method call) indicated by horizontal arrow to other object write message name and arguments above arrow dashed arrow back indicates return different arrowheads for normal / concurrent (asynchronous) methods

Indicating method calls 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 to indicate recursion Activation Nesting

Indicating selection and loops frame: box around part of a sequence diagram to indicate selection or loop if -> (opt) [condition] if/else -> (alt) [condition], separated by horiz. dashed line loop -> (loop) [condition or items to loop over] [ balance <> ] opt < 100 . 00 > = alt loop

linking sequence diagrams if one sequence diagram is too large or refers to another diagram, indicate it with either: an unfinished arrow and comment a "ref" frame that names the other diagram when would this occur in our system?

Example sequence diagram

Why not just code it? Sequence diagrams can be somewhat close to the code level; why not just code up that algorithm rather than drawing it as a sequence diagram? a good sequence diagram is still above the level of the real code (not EVERY line of code is drawn on diagram) sequence diagrams are language-agnostic (can be implemented in many different languages non-coders can do sequence diagrams easier to do sequence diagrams as a team can see many objects/classes at a time on same page (visual bandwidth)

Thank You