SlideShare a Scribd company logo
SEQUENCE DIAGRAM
Dr. Kaushik Ghosh
School of Computer Science
University of Petroleum and Energy Studies
• Sequence diagrams are part of interaction model
• Each use case requires one or more sequence diagrams to describe its
behavior.
• Represents:
• (i) objects that interact
• (ii) time sequence of their interaction
Definition: A Sequence diagram is an interaction diagram that shows how
processes operate with one another and in what order.
Elements of a Sequence Diagram
• Participant: an object or entity that acts in the sequence diagram
• Message: communication between participant objects
• horizontal: which object/participant is acting
• vertical: time (down -> forward in time)
• message (method call) indicated by horizontal arrow to other object
• write message name and arguments above arrow
Contd.
• Focus of Control: represents the period during which an element is
performing an operation
• shown as tall, thin rectangle on a lifeline
• The top and the bottom of the of the rectangle are aligned with the initiation
and the completion time respectively.
• Lifeline: 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
Contd.
Lifetime of Objects
• Object creation: arrow with 'new' written above it
• Object deletion: an X at bottom of object's lifeline
An object created after the start of the scenario
appears lower than the others
Concurrent Processes
• Activations: show when a method is active – either executing or
waiting for a subroutine to return
• Asynchronous Message: (half arrow) a message which does not
block the caller, allowing the caller to carry on with its own
processing.
• Asynchronous messages can: (i)Create a new thread (ii) Create a new
object (iii) Communicate with a thread that is already running
• Deletion: an object deletes itself
• Synchronous Message: (full arrow) a message that blocks the caller
Fragments
• Sequence diagrams support a Fragment notation. The uses of
fragments include:
• Showing sequence loops
• Showing alternative paths
• Allowing two or more scenarios to be shown on one diagram
• Showing a reference to another detailed Sequence diagram fragment
• Allowing you to break up a large diagram into several smaller
diagrams
Fragment Examples
Sequence Diagram Examples
• Example 1: Primary (successful) scenario and a secondary(unsuccessful)
scenario in one diagram using an alt fragment
• Example 2: Secondary (unsuccessful) scenario where rooms offered are
rejected by the booking agent
• Example 3: A Fragment Sequence diagram showing the finer details for
the Get Reservation Details fragment, and includes a loop fragment
Example 1
Example 2
Example 3
Guidelines for Drawing Sequence Models
• Prepare at least one scenario per use case
• Abstract the scenarios into sequence diagrams: The seq. diagram
should clearly show the contribution of each actor.
• Divide complex interaction
• Prepare a sequence diagram for each error condition.
Case Study: Attendance Management System
• Scenario 1 : Log in
Scenario 2 : Update Student or faculty profile.
• Scenario 3 : Update Attendance
THANK YOU
•QUESTIONS ?

More Related Content

What's hot

Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lecture
Technology & Education
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
Swathy T
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
Shruti Dalela
 
Uml
UmlUml
Uml
UmlUml
Unified modeling language diagrams
Unified modeling language diagramsUnified modeling language diagrams
Unified modeling language diagrams
Alaa Ahmed
 
system sequence diagram
system sequence diagramsystem sequence diagram
system sequence diagram
Naeem Kamboh Ravian
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
Creately
 
UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGE
Raval Chirag
 
Lecture#08 sequence diagrams
Lecture#08 sequence diagramsLecture#08 sequence diagrams
Lecture#08 sequence diagrams
babak danyal
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
Mukesh Tekwani
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
Shahid Riaz
 
09 package diagram
09 package diagram09 package diagram
09 package diagram
Baskarkncet
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
Shilpa Wadhwani
 
Command Design Pattern
Command Design PatternCommand Design Pattern
Command Design Pattern
Shahriar Hyder
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
Manoj Reddy
 
Uml lecture
Uml lectureUml lecture
Uml lecture
Inocentshuja Ahmad
 
Use Case Modeling
Use Case ModelingUse Case Modeling
Use Case Modeling
Venkat Srinivasan
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
Ashesh R
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
Ramakant Soni
 

What's hot (20)

Ooad sequence diagram lecture
Ooad sequence diagram lectureOoad sequence diagram lecture
Ooad sequence diagram lecture
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
Uml
UmlUml
Uml
 
Uml
UmlUml
Uml
 
Unified modeling language diagrams
Unified modeling language diagramsUnified modeling language diagrams
Unified modeling language diagrams
 
system sequence diagram
system sequence diagramsystem sequence diagram
system sequence diagram
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
UNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGEUNIFIED MODELING LANGUAGE
UNIFIED MODELING LANGUAGE
 
Lecture#08 sequence diagrams
Lecture#08 sequence diagramsLecture#08 sequence diagrams
Lecture#08 sequence diagrams
 
Types of UML diagrams
Types of UML diagramsTypes of UML diagrams
Types of UML diagrams
 
Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
 
09 package diagram
09 package diagram09 package diagram
09 package diagram
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
 
Command Design Pattern
Command Design PatternCommand Design Pattern
Command Design Pattern
 
Unit 1( modelling concepts & class modeling)
Unit  1( modelling concepts & class modeling)Unit  1( modelling concepts & class modeling)
Unit 1( modelling concepts & class modeling)
 
Uml lecture
Uml lectureUml lecture
Uml lecture
 
Use Case Modeling
Use Case ModelingUse Case Modeling
Use Case Modeling
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
 
Class diagram- UML diagram
Class diagram- UML diagramClass diagram- UML diagram
Class diagram- UML diagram
 

Similar to Sequence diagram

Sequence diagrams
Sequence diagramsSequence diagrams
Sequence diagrams
Preeti Mishra
 
07 interaction diagrams
07 interaction diagrams07 interaction diagrams
07 interaction diagrams
Baskarkncet
 
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
جامعة القدس المفتوحة
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdf
mounikanarra3
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
Rahul Pola
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
CherryBerry2
 
MID2 UML (1).pptx
MID2 UML (1).pptxMID2 UML (1).pptx
MID2 UML (1).pptx
mounikanarra3
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
Tony Huynh
 
Ooad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagramOoad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagram
RimshaLiaqat5
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
Amr E. Mohamed
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
AMITJain879
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
RAJESH S
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-
Taymoor Nazmy
 
Dfd and seq
Dfd and seqDfd and seq
Dfd and seq
rafasattar
 
Chapter3
Chapter3Chapter3
Chapter3
Fahad Sheref
 
presentation on sequence and state flow diagram
presentation on sequence and state flow diagrampresentation on sequence and state flow diagram
presentation on sequence and state flow diagram
pandey27ram
 
UML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptxUML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptx
raghavanp4
 
Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2
Shwetha-BA
 
UML
UMLUML
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction DiagramsSE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
Amr E. Mohamed
 

Similar to Sequence diagram (20)

Sequence diagrams
Sequence diagramsSequence diagrams
Sequence diagrams
 
07 interaction diagrams
07 interaction diagrams07 interaction diagrams
07 interaction diagrams
 
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdf
 
Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
UML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussionUML Diagram @ Software engineering discussion
UML Diagram @ Software engineering discussion
 
MID2 UML (1).pptx
MID2 UML (1).pptxMID2 UML (1).pptx
MID2 UML (1).pptx
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
 
Ooad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagramOoad sequence diagram_collaboration diagram
Ooad sequence diagram_collaboration diagram
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
Basic Behavioral Modeling
Basic Behavioral ModelingBasic Behavioral Modeling
Basic Behavioral Modeling
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-
 
Dfd and seq
Dfd and seqDfd and seq
Dfd and seq
 
Chapter3
Chapter3Chapter3
Chapter3
 
presentation on sequence and state flow diagram
presentation on sequence and state flow diagrampresentation on sequence and state flow diagram
presentation on sequence and state flow diagram
 
UML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptxUML Design Document Training Learn UML .pptx
UML Design Document Training Learn UML .pptx
 
Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2 Introduction to OOA and UML - Part 2
Introduction to OOA and UML - Part 2
 
UML
UMLUML
UML
 
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction DiagramsSE18_Lec 10_ UML Behaviour and Interaction Diagrams
SE18_Lec 10_ UML Behaviour and Interaction Diagrams
 

Recently uploaded

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 

Recently uploaded (20)

Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 

Sequence diagram

  • 1. SEQUENCE DIAGRAM Dr. Kaushik Ghosh School of Computer Science University of Petroleum and Energy Studies
  • 2. • Sequence diagrams are part of interaction model • Each use case requires one or more sequence diagrams to describe its behavior. • Represents: • (i) objects that interact • (ii) time sequence of their interaction Definition: A Sequence diagram is an interaction diagram that shows how processes operate with one another and in what order.
  • 3. Elements of a Sequence Diagram • Participant: an object or entity that acts in the sequence diagram • Message: communication between participant objects • horizontal: which object/participant is acting • vertical: time (down -> forward in time) • message (method call) indicated by horizontal arrow to other object • write message name and arguments above arrow
  • 4. Contd. • Focus of Control: represents the period during which an element is performing an operation • shown as tall, thin rectangle on a lifeline • The top and the bottom of the of the rectangle are aligned with the initiation and the completion time respectively. • Lifeline: 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
  • 6. Lifetime of Objects • Object creation: arrow with 'new' written above it • Object deletion: an X at bottom of object's lifeline
  • 7.
  • 8. An object created after the start of the scenario appears lower than the others
  • 9. Concurrent Processes • Activations: show when a method is active – either executing or waiting for a subroutine to return • Asynchronous Message: (half arrow) a message which does not block the caller, allowing the caller to carry on with its own processing. • Asynchronous messages can: (i)Create a new thread (ii) Create a new object (iii) Communicate with a thread that is already running • Deletion: an object deletes itself • Synchronous Message: (full arrow) a message that blocks the caller
  • 10. Fragments • Sequence diagrams support a Fragment notation. The uses of fragments include: • Showing sequence loops • Showing alternative paths • Allowing two or more scenarios to be shown on one diagram • Showing a reference to another detailed Sequence diagram fragment • Allowing you to break up a large diagram into several smaller diagrams
  • 12. Sequence Diagram Examples • Example 1: Primary (successful) scenario and a secondary(unsuccessful) scenario in one diagram using an alt fragment • Example 2: Secondary (unsuccessful) scenario where rooms offered are rejected by the booking agent • Example 3: A Fragment Sequence diagram showing the finer details for the Get Reservation Details fragment, and includes a loop fragment
  • 16. Guidelines for Drawing Sequence Models • Prepare at least one scenario per use case • Abstract the scenarios into sequence diagrams: The seq. diagram should clearly show the contribution of each actor. • Divide complex interaction • Prepare a sequence diagram for each error condition.
  • 17. Case Study: Attendance Management System • Scenario 1 : Log in
  • 18. Scenario 2 : Update Student or faculty profile.
  • 19. • Scenario 3 : Update Attendance