Sequence Diagram SAD ::: Fall 2015 Sabbir Muhammad Saleh.

Slides:



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

System Sequence Diagrams
UML (Sequence Diagrams, Collaboration and State Chart Diagrams) Presentation By - SANDEEP REDDY CHEEDEPUDI (Student No: ) - VISHNU CHANDRADAS (Student.
Session 18 Modeling the Dynamic View: The Collaboration Diagram Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 20, 2011 Presented.
Slide 6B.1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. An Introduction to Object-Oriented Systems Analysis and Design with.
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
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
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
SE-565 Software System Requirements More UML Diagrams.
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
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
INFO 620Lecture #51 Information Systems Analysis and Design Sequence and Collaboration Diagrams INFO 620 Glenn Booker.
CS3773 Software Engineering
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.
Interaction diagrams Sequence and collaboration diagrams.
UML / UML 2.0 Diagrams (Part III) 1. Sequence diagram is the most common kind of interaction diagram. It focuses on the message interchange between a.
Interaction Modeling Interaction model describes how objects interact to produce useful results. Interactions can be modeled at different levels of abstraction:
Introduction to Interaction Diagrams Used to illustrate the dynamic behaviour of a community of objects that collaborate by passing messages in order to.
System Sequence Diagrams. Recap When to create SSD? How to identify classes/instances? Use case descriptions UML notations for SSD.
Chapter 5 – System Modeling
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.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 UML Sequence Diagrams.
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
UML January 26, 2011 CSE 403, Winter 2011, Brun UML Sequence Diagrams.
Collaboration Diagrams CSIS3600. What is a Collaboration Diagram Collaboration diagrams illustrate interactions between objects The collaboration diagram.
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.
 C-style pointer-based arrays  Have great potential for errors and several shortcomings  C++ does not check whether subscripts fall outside the range.
Information Systems Engineering Interaction Diagrams: Sequence Diagram Collbortion Diagram.
Drawing System Sequence Diagrams
Sequence Models.
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.
(c) Addison Wesley Copyright © 2000 by Addison Wesley Version 1.0
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
(14-2) UML Instructor - Andrew O’Fallon CptS 122 (December 2, 2015) Washington State University.
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.
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.
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
UML UML Sequence Diagrams CSE 403
Prepared By Sidra Noureen
Sequence Diagram.
Sequence Diagrams.
UML Sequence Diagrams.
Object Oriented Analysis and Design
Princess Nourah bint Abdulrahman University
Classification of UML Diagrams
Week 12: Activity & Sequence Diagrams
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
UML Interaction diagrams
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

Sequence Diagram SAD ::: Fall 2015 Sabbir Muhammad Saleh

An interaction diagram models communication behavior of individuals exchanging information to accomplish some task. Sequence diagram—shows interacting individuals along the top and message exchange down the page. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Frame—a rectangle with a pentagon in the upper left-hand corner called the name compartment. sd interactionIdentifier interactionIdentifier is either a simple name or an operation specification as in a class diagram Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Participating individuals are arrayed across the diagram as lifelines: Rectangle containing an identifier Dashed line extending down the page The vertical dimension represents time; the dashed line shows the period when an individual exists. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

An new object appears at the point it is created. Not clear from UML specification A destroyed object has a truncated lifeline ending in an X. Persisting objects have lifelines that run the length of the diagram. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

name—simple name or “self”; optional selector—expression picking out an individual from a collection Format not specified in UML Optional; if omitted, so are the brackets typeName—Type of the individual Format not specified in UML Optional; if omitted, so is the colon Either name, typeName, or both must appear name[ selector ] : typeName Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

player[i] : Player player[i] : Player board Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Used when the interaction is “owned” by one of the interacting individuals Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Synchronous—The sender suspends execution until the message is complete Asynchronous—The sender continues execution after sending the message Synchronous message return or instance creation Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

variable—name of variable assigned a result Optional; if omitted, so is the equals sign name—simple name of the message argumentList—list of arguments in parentheses varName = paramName = paramName may be omitted paramName = argumentValue = argumentValue may be omitted Optional; parentheses may appear even if omitted Message specification may be * (any message) Sabbir Muhammad Saleh ::: SAD ::: Fall 2015 variable = name argumentList

hello hello() msg = getMessage( helloMessage ) x = sin( a/2 ) x = sin( angle = a/2 ) trim( result = aString ) Note that assigning a value to a parameter and assigning a returned value to a variable cannot be distinguished. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

An operation is executing when some process is running its code. An operation is suspended when it sends a synchronous message and is waiting for it to return. An operation is active when it is executing or suspended. The period when an object is active can be shown using an execution occurrence. Thin white or grey rectangle over lifeline dashed line Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Put the sender of the first message leftmost. Put pairs of individuals that interact heavily next to one another. Position individuals to make message arrows as short as possible. Position individuals to make message arrows go from left to right. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Put the self lifeline leftmost. In a sequence diagram modeling an operation interaction, draw the self execution occurrence from the top to the bottom of the diagram. Name individuals only if they are message arguments or are used in expressions. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Choose a level of abstraction for the sequence diagram. Suppress messages individuals send to themselves unless they generate messages to other individuals. Suppress return arrows when using execution occurrences. Don’t assign values to message parameters by name. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Sequence diagrams are useful for modeling Interactions in mid-level design; The interaction between a product and its environment (called system sequence diagrams); Interactions between system components in architectural design. Sequence diagrams can be used as (partial) use case descriptions. Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

The reference numbers on the figure denotes: 1.Object lifeline 2.Message/Stimulus 3.Iteration 4.Self-reference 5.Return 6.Anonymous object 7.Object name 8.Sequence number 9.Condition 10.Basic comment Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

1.Activation: The start of the vertical rectangle, the activation bar 2.Deactivation: The end of the vertical rectangle, the activation bar 3.Timeout event: Typically signified by a full arrowhead with a small clock face or circle on the line 4.Asynchronous event: Typically signified by a stick arrowhead 5.Object termination symbolized by an X Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

customer Successful purchase Unsuccessful purchase attempt

1.Successful purchase of stock 2.Un-successful purchase of stock – inadequate funds available Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

User logs in Selects the stock he wishes to purchase Specifies how much stock he wants to buy Specifies the limits on the price he is willing to pay Places order System responds with details of successful purchase Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

People Customer Web Interfaced Computer System Stockbroker System SecuritiesExchange

Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

1.User logs in 2.Select stock he wishes to purchase 3.Specifies how much stock he wants to buy 4.Specifies limits on the price he is willing to pay 5.Place order 6.Order rejected due to lack of funds 7.Delete order Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

User Boils water Fills with water

User turns on switch Water heats up and boils Element overheats and cuts out User adds more water Cut out cooled sufficiently to re-connect User turns on switch Water boils Sabbir Muhammad Saleh ::: SAD ::: Fall 2015

Electric Heater Energy source: electricity Provides heat Energy source Power rating Heater Provides heat Electric Element Liquid Provides heat to temperature Cut-out temperature Cut-out reset

Sabbir Muhammad Saleh ::: SAD ::: Fall 2015 liquid Boiling point Latent heat of vaporisation boiling Water Boiling point = 100 o C Switch State = [ On or Off] Allows current to flow or not

Sabbir Muhammad Saleh ::: SAD ::: Fall 2015 User Switch onActivate {Loop until cut-out or boils}heat {loop } update temperature {Loop } update temperature Check cut- out temperature

User turns on switch Water heats up and boils Element overheats and cuts out End here and delete the rest of the scenario User adds more water Cut out cooled sufficiently to re-connect User turns on switch Water boils Sabbir Muhammad Saleh ::: SAD ::: Fall 2015