Sequence Diagram Lecture # 1. Sequence Diagram Definition A Sequence diagram is an interaction diagram that shows how the objects and classes involved.

Slides:



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

© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Session 18 Modeling the Dynamic View: The Collaboration Diagram Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 20, 2011 Presented.
Sequence Diagrams. Introduction A Sequence diagram depicts the sequence of actions that occur in a system. The invocation of methods in each object, and.
Assess A Claim Object Interaction Diagrams. Object sequence Diagrams - Use case Sequence of events that occur during one particular execution of a system.
Lecture 5a: Sequence Interaction Diagrams CSE 111 Copyright W. Howden1.
THE OBJECT-ORIENTED DESIGN WORKFLOW UML2 Sequence Diagrams.
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Object Collaborations. Objectives: Object Interaction (cont.) You will be able to:  Use sequence diagrams to detail object interactions.
Sequence Diagram. What is Sequence Diagram?  Sequence Diagram is a dynamic model of a use case, showing the interaction among classes during a specified.
Lab 6 CPIT 250 System Analysis and Design.
Object-oriented design Part 4: More UML. Interfaces An interface is a language construct specific to Java Java does not support multiple inheritance Interfaces.
SEQUENCE DIAGRAM Prepared by: T. Fatimah Alageel.
UML Sequence Diagrams Reading: UML Distilled Ch. 4, by M. Fowler
Sequence Diagram Tutorial
CS3773 Software Engineering
Interaction diagrams Sequence and collaboration diagrams.
UML S EQUENCE D IAGRAMS 1 Dr. Hoang Huu Hanh, OST – Hue University hanh-at-hueuni.edu.vn.
03/12/2001 © Bennett, McRobb and Farmer Object Interaction Based on Chapter 9 of Bennett, McRobb and Farmer: Object Oriented Systems Analysis and.
System Sequence Diagrams. Recap When to create SSD? How to identify classes/instances? Use case descriptions UML notations for SSD.
1 Sequence Diagrams (Based on Stevens and Pooley (2006, Chapters 9, 10) and Fowler (2004, Chapter 4)) David Meredith Aalborg University.
Interaction Models (2): Sequence Diagrams Extracted from textbook: Object Oriented Modeling and Design with UML M. Blaha, J. Rumbaugh 1.
UML January 26, 2011 CSE 403, Winter 2011, Brun UML Sequence Diagrams.
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.
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.
Sequence Diagrams CSIS3600. Sequence Diagrams A sequence diagram shows an interaction arranged in time sequence. In particular, it shows the objects participating.
Object Oriented Analysis and Design Sequence Diagrams.
UNIFIED MODELING LANGUAGE(UML) BY Touseef Tahir Lecturer CS COMSATS Institute of Information Technology, Lahore.
Chapter 3: Introducing the UML
Sequence Diagram SAD ::: Fall 2015 Sabbir Muhammad Saleh.
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.
Appendix 3 Object-Oriented Analysis and Design
Sequence Diagram.
Unified Modeling Language (UML)
UML SEQUENCE DIAGRAM.
UML Modeling Sequence diagram
Sequence Diagrams.
Interaction View.
COMP 2710 Software Construction Sequence Diagrams (cont.)
UML UML Sequence Diagrams CSE 403
Object-Oriented Systems Analysis and Design Using UML
Sequence Diagram.
Communication DIAGRAM
Prepared By Sidra Noureen
Sequence Diagram.
Sequence Diagrams.
Business System Development
Sequence Diagrams.
UML Sequence Diagrams.
Object Oriented Analysis and Design
IMAT5205 Systems Analysis and Design
Superior University, Lahore
Week 12: Activity & Sequence Diagrams
UML Diagrams: Sequence Diagrams Dynamic Analysis Model
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
Interaction Diagrams Chapter 18.
Communication DIAGRAM
Chapter 9: Sequence Diagrams Chapter 5 in Software Engineering Book
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

Sequence Diagram Lecture # 1

Sequence Diagram Definition A Sequence diagram is an interaction diagram that shows how the objects and classes involved in the scenario operate with one another. the sequence of messages exchanged. Sequence diagram is interaction diagram that shows the set of objects and messages send and receive by those object. It mainly emphases on time ordering and messages.

Its Significance An organization's technical staff can find sequence diagrams useful in documenting how a future system should behave. During the design phase, architects and developers can use the diagram to force out the system's object interactions, thus fleshing out overall system design.

Sequence Diagram Key Parts participant: object or entity that acts in the diagram – diagram starts with an unattached "found message" arrow message: communication between participant objects the axes in a sequence diagram: – horizontal: which object/participant is acting – vertical: time(down -> forward in time)

Target Ramakant EISTI Cergy12/2/ Objects as well as classes can be targets which means that messages can be sent to them. A target is displayed as a rectangle with some text in it. Below the target, its lifeline(vertical dashed line) extends for as long as the target exists. Target Lifeline

Objects or Participants  The sequence diagram is made up of collection of participants or objects. Participants are system parts that interact each other during sequence diagram.  The participants interact with each other by sending and receiving message

Actor

Lifeline  Lifeline represents the existence of an object over a period of time.  It is represented by vertical dashed line.  Most objects that appeared in ‘Interaction diagram’ will be in existence for the duration of an interaction. So, these objects are aligned at top at top of diagram with their lifeline from top to bottom of diagram.

Activation bar  It is also called as focus of control. It shows the period of time during which an object is performing an action.  The top of rectangle is aligned with start of the action. The bottom is aligned with its completion and can be marked by a written message  It is represented by tall thin rectangle:

Messages . The interaction in a sequence diagram between the objects can be shown by using messages.  The messages on sequence diagram are specifies using an arrow from participant that wants to pass the messages to the participant that receive the messages.  Messages can be flow in whatever direction required for interaction from left to right and right to left.

Messages It has following kinds of messages: 1)Synchronous messages:- * It is a message where the sender is blocked and waits until the receiver has finished processing of message. * It is invoked the caller waits for the receiver to return from the message invocation. * It is represented by solid line with full arrow. 2)Asynchronous messages:- * It is a messages where the sender is not blocked and can continue executing. * It is represent by solid line with half arrow.

Synchronous Message

Asynchronous Message

Messages  It has following kinds of messages: 3)Reflexive messages:- * If the object sends the message to itself then it is called as ‘Reflexive message. * It is represented by solid line with loops the lifeline of object. 4)Return messages:- * It can be used at the end of activation bar to show that control flow of activation returns to the participant that pass the original message. * It is represent by dashed line from sender to receiver.

Return Message

Reflexive Message

Create messages It is used to create object during interaction. The object can be created by using > to indicate the timing of creation. Creating message can be shown as below:

Creating Objects ObjectOne > ObjectTwo message The lifeline is destroyed > X

Creating Objects WebInterface Database Wrapper Validate User [logged in] Retrieve User [invalid user] > MessageBox [invalid user] Display Error Message [invalid user] > X

Destroy messages It is used to destroy the objects during interaction. The objects can be terminated using > which points to an “x”. It indicates that object named message is terminated.

Example

Time  The sequence diagram describes the order in which interaction takes place.  So time in an important factor. The time on sequence diagram starts at top of the page just below the object and then progress down the page.  Time is all about ordering but not duration.

Messages

Message Types & representation

Example

Sequence Diagram (make a phone call) CallerPhoneRecipient Picks up Dial tone Dial Ring notification Ring Picks up Hello

Example

Case Study Model a Sequence Diagram: Case Study The following requirements are for a computerized grading system: The teacher views the grades for a student successfully The teacher attempts to view the grades for a student but the student doesn’t exist in the system The teacher attempts to view the grades for a student but the student does not have any grades

2. Lay Out Objects StudentInfo WebInterface Database Wrapper Teacher Student Grades

3. Include Messages and Conditions StudentInfo WebInterface Database Wrapper Teacher Student Grades Request Student Info Get Student Data Load Student Return Student Info Load Grades Return Grades for Student Return Student Info Display Student Info

4. Include conditions StudentInfo WebInterface Database Wrapper Teacher Student Grades Request Student Info Get Student Data Load Student (Student not found) (Failure) > MessageBox Display Error > X

UML Diagrams for ATM: Use Case

Sequence diagram

Add Doctor

Validate Passward

LOGIN