Sequence Diagrams.

Slides:



Advertisements
Similar presentations
System Sequence Diagrams
Advertisements

Interaction Diagram Notation From Chapter 15 of Craig Larman, Applying UML and Patterns John Dalesandro.
Jan 15, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration: a simple cash-only success scenario of Process Sale.
Drawing System Sequence Diagrams
Systems Analysis and Design in a Changing World, Fourth Edition
January Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Elaboration Iteration 1: a simple cash-only success scenario of.
Chapter 10 System Sequence Diagrams. What is a System Sequence Diagram? A way of modeling input and output events related to systems It is a picture that.
1 © Wolfgang Pelz UML2 UML Part Two. 2 © Wolfgang Pelz UML2 Chapters Four & Twelve Interaction Diagrams.
© 2005 Prentice Hall4-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
NJIT Drawing System Sequence Diagrams Chapter 10 Applying UML and Patterns Craig Larman Presented by Anuradha Dharani.
Detailed Object-Oriented Requirements Definitions
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.
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Chapter 7: The Object-Oriented Approach to Requirements
SENG 403 SENG 403 – Winter  Brief introduction to SSD  Example (A sales systems (Cashier))  Example (Monopoly game) SENG 403 – Winter 2012.
Interaction diagrams Sequence and collaboration diagrams.
Object Oriented Analysis and Design System Events & Contracts.
System Sequence Diagrams. Recap When to create SSD? How to identify classes/instances? Use case descriptions UML notations for SSD.
Lecture 7 Object Oriented Design. Outline  What is UML and why we use UML?  How to use UML diagrams to design software system?  What UML Modeling tools.
Systems Analysis and Design in a Changing World, Fifth Edition
Dynamic Modeling Chapter 11 Part of Analysis Modeling Designing Concurrent, Distributed, and Real-Time Applications with UML Hassan Gomaa (2001)
1 Modeling interactions and behavior Lecturer Dr. Mai Fadel.
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.
PRJ566 System Sequence Diagrams.  A system sequence diagram …. Illustrates input and output events related to the system under discussion.  Larman,
7 Systems Analysis and Design in a Changing World, Fifth Edition.
♦ Use Case Model  Detailled use case - Important  Use case diagram- Refactoring Use case diagram  > 1 Last Lectures.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Drawing System Sequence Diagrams
COMP-350 Object-Oriented Analysis and Design Drawing System Sequence Diagrams Reference: Larman, Chapter 9.
Sequence Diagrams CSIS3600. Sequence Diagrams A sequence diagram shows an interaction arranged in time sequence. In particular, it shows the objects participating.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
CSCI-383 Object-Oriented Programming & Design Lecture 12.
System Sequence Diagram Chandan Rupakheti & Steve Chenoweth Week 5-3a.
Dynamic Models Sequence Diagrams Collaboration Diagrams Activity Diagrams.
Systems Analysis and Design in a Changing World, Fourth Edition
Summary from previous lectures
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.
Appendix Object-Oriented Analysis and Design: Use Cases and Sequence Diagrams Modern Systems Analysis and Design Fifth Edition Jeffrey A. Hoffer Joey F.
Page 1  Copyright © 1997 by Rational Software Corporation Putting the UML to Work The ESU University wants to computerize their registration system –
7 Systems Analysis – ITEC 3155 The Object Oriented Approach – Use Cases.
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.
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.
1 Object Oriented Analysis and Design System Events & Contracts.
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
Business Process and Functional Modeling
UML Modeling Sequence diagram
BTS430 Systems Analysis and Design using UML
Chapter 11: Collaboration Diagram - PART1
Object-Oriented Systems Analysis and Design Using UML
Sequence and Collaboration Diagrams
Communication DIAGRAM
Behavioral Modeling.
Princess Nourah bint Abdulrahman University
Object Oriented Analysis and Design
Requirements To Design In This Iteration
Princess Nourah bint Abdulrahman University
How do we convince people that in programming simplicity and clarity —in short: what mathematicians call "elegance"— are not a dispensable luxury, but.
Sequence Diagrams Lecture 6.
Week 12: Activity & Sequence Diagrams
CIS 375 Bruce R. Maxim UM-Dearborn
Unified Modelling Language
Interaction diagrams Interaction diagrams are models that describe how groups of objects collaborate in some behavior. Typically, an interaction diagram.
Communication DIAGRAM
CSE470 Software Engineering UML Lecture.  UML resource page
System Sequence Diagrams(SSD)
CIS 375 Bruce R. Maxim UM-Dearborn
Presentation transcript:

Sequence Diagrams

Traditional System Development Life Cycle (SDLC)

Sequence and communication Diagrams Can be used interchangeably Sequence diagram Emphasize the time ordering of messages Communication diagram Emphasize the organization of objects Interaction diagram CT 1414 * Nouf Aljaffan 13/11/2018

Diagrams in UML - Sequence Diagram A sequence diagram displays object interactions arranged in a time sequence course form : theManager : : Registrar CourseForm CurriculumManager Registrar Create Course This use case begins after the Registrar logs onto the Registration System with a valid password. The registrar fills in the course form with the appropriate semester and course related info. The Registrar requests the system to process the course form. The system creates a new course, and this use case ends 1: set course info 2: request processing 3: add course aCourse : 4: <<create>> Course Traceability!

System Sequence Diagram vs Sequence Diagram A System Sequence Diagram is an artifact that illustrates input and output events related to the system under discussion. System Sequence Diagrams are typically associated with use- case realization in the logical view of system development. Sequence Diagrams (Not System Sequence Diagrams) display object interactions arranged in time sequence.

Sequence diagram Sequence diagram can illustrate a succession of interactions between classes or object instances over time. It illustrate the processing described in use case scenario/ description. Sequence diagram Interactions Relationships Methods CT 1414 * Nouf Aljaffan 13/11/2018

Introduction – System Sequence Diagram A system sequence diagram is a fast and easily created artifact that illustrates input and output events related to the systems under discussion Before proceeding to a logical design of how a software application will work, we should investigate and define the system behavior as a "black box“.

System sequence diagram A system sequence diagram (SSD) is a picture that shows, for a particular scenario of a use case, the events that external actors generate, their order, and inter-system events. An SSD is generated from inspection of a use case Suggestion: One SSD – one Use Case

SSD—System Behavior System behaves as “Black Box”. Interior objects are not shown, as they would be on a Sequence Diagram. :System

System Sequence Diagrams For a particular scenario of use-case an SSD shows- The external actors that interact directly with the system. The System (as a black box). The system events that the actors generate.

System Sequence Diagrams The operations of the system in response to the events generated. System Sequence Diagrams depict the sequential order of the events. System Sequence Diagrams should be done for the main success scenario of the use-case, and frequent and alternative scenarios.

Notation Object: Objects are instances of classes. Object is represented as a rectangle which contains the name of the object underlined. Because the system is instantiated, it is shown as an object. :Object1

Notation (2) Actor: An Actor is modeled using the usual symbol, the stick figure. actor1

Notation (3) Lifeline: The LifeLine identifies the existence of the object over time. The notation for a Lifeline is a vertical dotted line extending from an object.

Notation (4) Message: Messages, modeled as horizontal arrows between Activations, indicate the communications between objects. messageName(argument)

Notation (5) Return Message: Messages, modeled as dashed horizontal arrows messageName

messages Messages are labeled using one of the following formats: The name of the message followed by empty parentheses: messageName(). The name of the message followed by parameters in parentheses: messageName(parameter1, parameter2 …). The name of the message followed by parameter type, parameter name and any default values messageName(parameterType:parameterName(default value)). CT 1414 * Nouf Aljaffan 13/11/2018

Example of an SSD Following example shows the success scenario of the Process Sale use case. Events generated by cashier (actor)-    makeNewSale    enterItem      endSale and     makePayment.

Sequence Diagram:Object interaction Synchronous Asynchronous Transmission delayed Self-Call [condition] remove() *[for each] remove() Self-Call: A message that an Object sends to itself. Condition: indicates when a message is sent. The message is sent only if the condition is true. Condition Iteration

Sequence Diagrams – Object Life Spans Creation Create message Object life starts at that point Activation Symbolized by rectangular stripes Place on the lifeline where object is activated. Rectangle also denotes when object is deactivated. Deletion Placing an ‘X’ on lifeline Object’s life ends at that point A B Create X Deletion Return Lifeline Activation bar

Sequence Diagram Message Sequence diagrams demonstrate the behavior of objects in a use case by describing the objects and the messages they pass. The horizontal dimension shows the objects participating in the interaction. The vertical arrangement of messages indicates their order. The labels may contain the seq. # to indicate concurrency.

Sequence Diagram(make a phone call) Caller Phone Recipient Picks up Dial tone Dial Ring notification Ring Picks up Hello

SSD for Process Sale scenario

System Sequence Diagrams and Use Cases System Sequence Diagram is generated from inspection of a use case. Constructing a systems sequence diagram from a use case- 1.Draw a line representing the system as a black box. 2.Identify each actor that directly operates on the system. Draw a line for each such actor.    3.From the use case, typical course of events text, identify the system (external) events that each actor generates. They will correspond to an entry in the right hand side of the typical use case. Illustrate them on the diagram.

SSDs are derived from use cases.

System Events and System Boundary Identifying the System events- Determine the actors that directly interact with the system. In the process Sale example, the customer does not directly interact with the POS system. Cashier interacts with the system directly. Therefore cashier is the generator of the system events.

Naming System Events and Operations External input event generated by an actor. Initiates a responding operation by system. System operation Operation invoked in response to system event.

Naming System Events and Operations System events and their associated system operations should be expressed at the level of intent rather than in terms of the physical input medium or widget. In order to improve the clarity, it is appropriate to start the name of the system event with a verb (for example- add….,enter….,end….,make…. etc.,). It also emphasizes the command origination of these events.

Naming System Events and Operations For example “enterItem” is better than “scan” as it captures the intent of operation rather than what interface is used to capture the system event (design choice).

Choose event and operation names at an abstract level

Showing Use Case Text It is desirable to show at least fragments of use case text for the scenario. The text provides the details and context, while the diagram visually summarizes the interaction.

SSD with use case text

Conclusion System Sequence Diagrams provide a way for us to visually step through invocation of the operations defined by Use-Cases. It is not necessary to create SSDs for all scenarios of all use-cases,at least not at the same time.