SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Sequence DiagramsSequence Diagrams
Preeti MishraPreeti Mishra
Course InstructorCourse Instructor
Also Known as:
Interaction Diagrams
Event Trace Diagram
Scenarios
Message Diagram
Sequence Diagrams
Scenarios
• A scenario is a sequence of events that occurs
during one particular execution of a system.
• A scenario can include all events in the system or
can only include these events that are generated
by a certain object in that system.
• A scenario can be a historical record of executing
or simulating the execution of a system or an
object.
Interaction Diagrams
• UML Specifies a number of
interaction diagrams to model
dynamic aspects of the system
• Dynamic aspects of the system
– Messages moving among objects/
classes
– Flow of control among objects
– Sequences of events
Dynamic Diagram
Types
• Interaction Diagrams - Set of objects or roles and
the messages that can be passed among them.
– Sequence Diagrams - emphasize time ordering
– Communication Diagrams - emphasize structural
ordering
• State Diagrams
– State machine consisting of states, transitions,
events and activities of an object
• Activity/Swimlane Diagrams
– Emphasize and show flow of control among objects
Sequence Diagrams
• Describe the flow of messages,
events, actions between objects
• Show concurrent processes and
activations
• Show time sequences that are not easily
depicted in other diagrams
• Typically used during analysis and design to
document and understand the logical flow of
your system
Emphasis on time ordering!Emphasis on time ordering!
Sequence Diagrams
• Each event transmits information from one object
to another.
• Example:
– dial tone begins event transmits a signal from
the phone line to the caller.
• In Event Trace:
– Identify sender and receiver objects of each
event.
• Event Trace Diagram (ETD) shows the sequence of
events and the object exchanging these events.
• ETD shows object as a vertical line and each event
as a horizontal line from the sender to the receiver.
Event Trace Diagram for a
Phone Call
Caller Phone line Callee
caller lifts receiver
dial tone begins
dials (5)
dial tone ends
dials (5)
dials (5)
dials (1)
dials (2)
dials (3)
dials (4)
ringing tone
tone stop
phone rings
answers phone
ringing stops
phone connectedphone connected
callee hangs up
connection brokenconnection broken
Sequence diagrams
• Vertical line is called an object’s lifeline
– Represents an object’s life during interaction
• Object deletion denoted by X, ending a lifeline
– Horizontal arrow is a message between two objects
• Order of messages sequences top to bottom
• Messages labeled with message name
– Optionally arguments and control information
• Control information may express conditions:
– such as [hasStock], or iteration
• Returns (dashed lines) are optional
– Use them to add clarity
Definition:
A sequence shows a series of messages
exchanged by A selected set of objects in
temporally limited situation, With emphasis on
the chronological course of events.
Objects are shown by vertical lifelines. This
highlights The chronological sequence of the
message.
Time runs from top to bottom.
Sequence Diagrams
Definition
Sequence Diagram
Components
Two major components
– Active objects
– Communications between these active objects
• Messages sent between the active objects
Sequence Diagram -
Objects
• A life line illustrates what is happening to an object in a
chronological fashion.
:Name
Life line
Activation
Object
Sequence Diagram – Time
& Messages
• Messages are used to illustrate communication
between different active objects of a sequence
diagram.
:Name1 :Name2
Message Two
Actor
Message One
Active Objects
Actor
– A person or system that derives benefit
from and is external to the system
– Participates in a sequence by sending
and/or receiving messages
Components
lifeline
execution
Components
Return value
Method call
Sequence Diagram
Active objects
– Any objects that play a role in the system
– Participate by sending and/or receiving
messages
– Placed across the top of the diagram
– Can be:
• An actor (from the use case diagram)
• Object/class (from the class diagram) within the
system
Communications
between Active Objects
Messages
– Used to illustrate communication between different
active objects of a sequence diagram
– Used when an object needs
• to activate a process of a different object
• to give information to another object
A message is represented by an arrow between the life
lines of two objects.
– Self calls are allowed
A message is labeled at minimum with the message name.
– Arguments and control information (conditions, iteration) may be
included.
Types of Messages
 Synchronous (flow interrupt until the
message has completed)
 Asynchronous (don’t wait for response)
 Flat (no distinction between sysn/async)
 Return (control flow has returned to the
caller)
21
Types of Messages
• Synchronous (flow interrupt until the
message has completed.
• Asynchronous (don’t wait for response)
• Flat – no distinction between sysn/async
• Return – control flow has returned to the
caller.
Other Elements
of Sequence Diagram
 Lifeline
 Focus of control (activation box or
execution occurrence)
 Control information
 Condition, repetition
Sequence Diagram
 Lifeline
 Denotes the life of actors/objects over
time during a sequence
 Represented by a vertical line below each
actor and object (normally dashed line)
 For temporary object
 place X at the end of the lifeline at the
point where the object is destroyed
Sequence Diagram
 Focus of control (activation box)
 Means the object is active and using
resources during that time period
 Denotes when an object is sending or
receiving messages
 Represented by a thin, long rectangular
box overlaid onto a lifeline
Control Information
 Condition
 syntax: ‘[‘ expression ’]’ message-label
 The message is sent only if the
condition is true
[ok] borrow(member)
1) Set the context.
a) Select a use case.
b) Decide the initiating actor.
Steps for Building a Sequence Diagram
Steps for Building
a Sequence Diagram
1. Set the context
2. Identify which objects and actors will participate
3. Set the lifeline for each object/actor
4. Lay out the messages from the top to the bottom
of the diagram based on the order in which they
are sent
5. Add the focus of control for each object’s or
actor’s lifeline
6. Validate the sequence diagram
Iterate
Iterate the Model
• Keep on doing this until
you, your customer,
and your engineers are
happy with the model
2) Identify the objects that may participate in the
implementation of this use case by completing
the supplied message table.
a) List candidate objects.
1) Use case controller class
2) Domain classes
3) Database table classes
4) Display screens or reports
Steps for Building a Sequence Diagram
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)
b) List candidate messages. (in message analysis
table)
1) Examine each step in the normal scenario
of the use case description to determine
the messages needed to implement that
step.
2) For each step:
1) Identify step number.
2) Determine messages needed to complete this
step.
3) For each message, decide which class holds
the data for this action or performs this action
3) Make sure that the messages within the table
Steps for Building a Sequence Diagram
2) Identify the objects (cont.)
c) Begin sequence diagram construction.
1) Draw and label each of the identified actors and
objects across the top of the sequence diagram.
2) The typical order from left to right across the top is the
actor, primary display screen class, primary use case
controller class, domain classes (in order of access),
and other display screen classes (in order of access)
3) Set the lifeline for each object/actor
4) Lay out the messages from the top to the
bottom of the diagram based on the order
in which they are sent.
a) Working in sequential order of the message
table, make a message arrow with the message
name pointing to the owner class.
b) Decide which object or actor initiates the
message and complete the arrow to its lifeline.
c) Add needed return messages.
d) Add needed parameters and control
information.
Steps for Building a Sequence Diagram
5) Add the focus of control (activation box) for
each object’s or actor’s lifeline.
6) Validate the sequence diagram.
Steps for Building a Sequence Diagram
Summary
• Sequence diagrams model object interactions with an
emphasis on time ordering
• Method call lines
– Must be horizontal!
– Vertical height matters!
“Lower equals Later”
– Label the lines
• Lifeline – dotted vertical line
• Execution bar – bar around lifeline when code is running
• Arrows
– Synchronous call (you’re waiting for a return value) – triangle
arrow-head
– Asynchronous call (not waiting for a return) – open arrow-head
– Return call – dashed line

Weitere ähnliche Inhalte

Was ist angesagt?

state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UMLKumar
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and designjayashri kolekar
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity DiagramNiloy Rocker
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML DiagramsManish Kumar
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLMalek Sumaiya
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramShakila Mahjabin
 
Java collections concept
Java collections conceptJava collections concept
Java collections conceptkumar gaurav
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologiesnaina-rani
 
Architecture design in software engineering
Architecture design in software engineeringArchitecture design in software engineering
Architecture design in software engineeringPreeti Mishra
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagramsartgreen
 
Activity diagram-UML diagram
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagramRamakant Soni
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 

Was ist angesagt? (20)

state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UML
 
Object oriented modeling and design
Object oriented modeling and designObject oriented modeling and design
Object oriented modeling and design
 
Uml Common Mechanism
Uml Common MechanismUml Common Mechanism
Uml Common Mechanism
 
Uml Activity Diagram
Uml Activity DiagramUml Activity Diagram
Uml Activity Diagram
 
Overview of UML Diagrams
Overview of UML DiagramsOverview of UML Diagrams
Overview of UML Diagrams
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
Sequence diagrame
Sequence diagrameSequence diagrame
Sequence diagrame
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Object diagram
Object diagramObject diagram
Object diagram
 
Architecture design in software engineering
Architecture design in software engineeringArchitecture design in software engineering
Architecture design in software engineering
 
Lecture04- Use Case Diagrams
Lecture04- Use Case DiagramsLecture04- Use Case Diagrams
Lecture04- Use Case Diagrams
 
Servlet life cycle
Servlet life cycleServlet life cycle
Servlet life cycle
 
Activity diagram-UML diagram
Activity diagram-UML diagramActivity diagram-UML diagram
Activity diagram-UML diagram
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 

Ähnlich wie Sequence diagrams

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 DiagramsAmr E. Mohamed
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsAmr E. Mohamed
 
07 interaction diagrams
07 interaction diagrams07 interaction diagrams
07 interaction diagramsBaskarkncet
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagramShahid Riaz
 
Unit three Advanced State Modelling
Unit three Advanced State ModellingUnit three Advanced State Modelling
Unit three Advanced State ModellingDr Chetan Shelke
 
Unit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptxUnit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptxanguraju1
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialCreately
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfmounikanarra3
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Taymoor Nazmy
 
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةجامعة القدس المفتوحة
 

Ähnlich wie Sequence diagrams (20)

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
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
07 interaction diagrams
07 interaction diagrams07 interaction diagrams
07 interaction diagrams
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
 
Chapter7
Chapter7Chapter7
Chapter7
 
Lecture11 use case sequence diagram
Lecture11 use case sequence diagramLecture11 use case sequence diagram
Lecture11 use case sequence diagram
 
Unit three Advanced State Modelling
Unit three Advanced State ModellingUnit three Advanced State Modelling
Unit three Advanced State Modelling
 
Unit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptxUnit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptx
 
R1x g13 4 diagrams i
R1x g13 4 diagrams iR1x g13 4 diagrams i
R1x g13 4 diagrams i
 
The Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram TutorialThe Ultimate Sequence Diagram Tutorial
The Ultimate Sequence Diagram Tutorial
 
Ooad 3
Ooad 3Ooad 3
Ooad 3
 
Sequence Diagram
Sequence Diagram Sequence Diagram
Sequence Diagram
 
Sequence Diagram
Sequence Diagram Sequence Diagram
Sequence Diagram
 
sequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdfsequencediagram-150302224029-conversion-gate01 (1).pdf
sequencediagram-150302224029-conversion-gate01 (1).pdf
 
MID2 UML (1).pptx
MID2 UML (1).pptxMID2 UML (1).pptx
MID2 UML (1).pptx
 
Chapter3
Chapter3Chapter3
Chapter3
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-
 
Jar chapter 4, part 1
Jar chapter 4, part 1Jar chapter 4, part 1
Jar chapter 4, part 1
 
Dfd and seq
Dfd and seqDfd and seq
Dfd and seq
 
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسةملخص تحليل الانظمة وتصميمها - الوحدة السادسة
ملخص تحليل الانظمة وتصميمها - الوحدة السادسة
 

Mehr von Preeti Mishra

Effective Ways to Conduct Programming labs
Effective Ways to Conduct Programming labsEffective Ways to Conduct Programming labs
Effective Ways to Conduct Programming labsPreeti Mishra
 
Unit 8 software quality and matrices
Unit 8 software quality and matricesUnit 8 software quality and matrices
Unit 8 software quality and matricesPreeti Mishra
 
Unit 5 design engineering ssad
Unit 5 design engineering ssadUnit 5 design engineering ssad
Unit 5 design engineering ssadPreeti Mishra
 
architectural design
 architectural design architectural design
architectural designPreeti Mishra
 
Oo concepts and class modeling
Oo concepts and class modelingOo concepts and class modeling
Oo concepts and class modelingPreeti Mishra
 
Unit 7 performing user interface design
Unit 7 performing user interface designUnit 7 performing user interface design
Unit 7 performing user interface designPreeti Mishra
 
testing strategies and tactics
 testing strategies and tactics testing strategies and tactics
testing strategies and tacticsPreeti Mishra
 
requirements analysis and design
requirements analysis and designrequirements analysis and design
requirements analysis and designPreeti Mishra
 
Design process interaction design basics
Design process interaction design basicsDesign process interaction design basics
Design process interaction design basicsPreeti Mishra
 
Design process design rules
Design process  design rulesDesign process  design rules
Design process design rulesPreeti Mishra
 
Design process evaluating interactive_designs
Design process  evaluating interactive_designsDesign process  evaluating interactive_designs
Design process evaluating interactive_designsPreeti Mishra
 
Foundations understanding users and interactions
Foundations  understanding users and interactionsFoundations  understanding users and interactions
Foundations understanding users and interactionsPreeti Mishra
 
Coupling coheshion tps
Coupling coheshion tpsCoupling coheshion tps
Coupling coheshion tpsPreeti Mishra
 

Mehr von Preeti Mishra (20)

Effective Ways to Conduct Programming labs
Effective Ways to Conduct Programming labsEffective Ways to Conduct Programming labs
Effective Ways to Conduct Programming labs
 
Uml intro
Uml introUml intro
Uml intro
 
Component diagram
Component diagramComponent diagram
Component diagram
 
Activity diag
Activity diagActivity diag
Activity diag
 
State chart diagram
State chart diagramState chart diagram
State chart diagram
 
Use case Diagram
Use case DiagramUse case Diagram
Use case Diagram
 
Unit 8 software quality and matrices
Unit 8 software quality and matricesUnit 8 software quality and matrices
Unit 8 software quality and matrices
 
Unit 5 design engineering ssad
Unit 5 design engineering ssadUnit 5 design engineering ssad
Unit 5 design engineering ssad
 
architectural design
 architectural design architectural design
architectural design
 
Oo concepts and class modeling
Oo concepts and class modelingOo concepts and class modeling
Oo concepts and class modeling
 
Unit 7 performing user interface design
Unit 7 performing user interface designUnit 7 performing user interface design
Unit 7 performing user interface design
 
testing strategies and tactics
 testing strategies and tactics testing strategies and tactics
testing strategies and tactics
 
requirements analysis and design
requirements analysis and designrequirements analysis and design
requirements analysis and design
 
Design process interaction design basics
Design process interaction design basicsDesign process interaction design basics
Design process interaction design basics
 
Design process design rules
Design process  design rulesDesign process  design rules
Design process design rules
 
Design process evaluating interactive_designs
Design process  evaluating interactive_designsDesign process  evaluating interactive_designs
Design process evaluating interactive_designs
 
Foundations understanding users and interactions
Foundations  understanding users and interactionsFoundations  understanding users and interactions
Foundations understanding users and interactions
 
IntrIntroduction
IntrIntroductionIntrIntroduction
IntrIntroduction
 
Coupling coheshion tps
Coupling coheshion tpsCoupling coheshion tps
Coupling coheshion tps
 
Analysis
AnalysisAnalysis
Analysis
 

Kürzlich hochgeladen

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgsaravananr517913
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 

Kürzlich hochgeladen (20)

INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfgUnit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
Unit7-DC_Motors nkkjnsdkfnfcdfknfdgfggfg
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 

Sequence diagrams

  • 1. Sequence DiagramsSequence Diagrams Preeti MishraPreeti Mishra Course InstructorCourse Instructor
  • 2. Also Known as: Interaction Diagrams Event Trace Diagram Scenarios Message Diagram Sequence Diagrams
  • 3. Scenarios • A scenario is a sequence of events that occurs during one particular execution of a system. • A scenario can include all events in the system or can only include these events that are generated by a certain object in that system. • A scenario can be a historical record of executing or simulating the execution of a system or an object.
  • 4. Interaction Diagrams • UML Specifies a number of interaction diagrams to model dynamic aspects of the system • Dynamic aspects of the system – Messages moving among objects/ classes – Flow of control among objects – Sequences of events
  • 5. Dynamic Diagram Types • Interaction Diagrams - Set of objects or roles and the messages that can be passed among them. – Sequence Diagrams - emphasize time ordering – Communication Diagrams - emphasize structural ordering • State Diagrams – State machine consisting of states, transitions, events and activities of an object • Activity/Swimlane Diagrams – Emphasize and show flow of control among objects
  • 6. Sequence Diagrams • Describe the flow of messages, events, actions between objects • Show concurrent processes and activations • Show time sequences that are not easily depicted in other diagrams • Typically used during analysis and design to document and understand the logical flow of your system Emphasis on time ordering!Emphasis on time ordering!
  • 7. Sequence Diagrams • Each event transmits information from one object to another. • Example: – dial tone begins event transmits a signal from the phone line to the caller. • In Event Trace: – Identify sender and receiver objects of each event. • Event Trace Diagram (ETD) shows the sequence of events and the object exchanging these events. • ETD shows object as a vertical line and each event as a horizontal line from the sender to the receiver.
  • 8. Event Trace Diagram for a Phone Call Caller Phone line Callee caller lifts receiver dial tone begins dials (5) dial tone ends dials (5) dials (5) dials (1) dials (2) dials (3) dials (4) ringing tone tone stop phone rings answers phone ringing stops phone connectedphone connected callee hangs up connection brokenconnection broken
  • 9. Sequence diagrams • Vertical line is called an object’s lifeline – Represents an object’s life during interaction • Object deletion denoted by X, ending a lifeline – Horizontal arrow is a message between two objects • Order of messages sequences top to bottom • Messages labeled with message name – Optionally arguments and control information • Control information may express conditions: – such as [hasStock], or iteration • Returns (dashed lines) are optional – Use them to add clarity
  • 10.
  • 11. Definition: A sequence shows a series of messages exchanged by A selected set of objects in temporally limited situation, With emphasis on the chronological course of events. Objects are shown by vertical lifelines. This highlights The chronological sequence of the message. Time runs from top to bottom. Sequence Diagrams Definition
  • 12. Sequence Diagram Components Two major components – Active objects – Communications between these active objects • Messages sent between the active objects
  • 13. Sequence Diagram - Objects • A life line illustrates what is happening to an object in a chronological fashion. :Name Life line Activation Object
  • 14. Sequence Diagram – Time & Messages • Messages are used to illustrate communication between different active objects of a sequence diagram. :Name1 :Name2 Message Two Actor Message One
  • 15. Active Objects Actor – A person or system that derives benefit from and is external to the system – Participates in a sequence by sending and/or receiving messages
  • 18. Sequence Diagram Active objects – Any objects that play a role in the system – Participate by sending and/or receiving messages – Placed across the top of the diagram – Can be: • An actor (from the use case diagram) • Object/class (from the class diagram) within the system
  • 19. Communications between Active Objects Messages – Used to illustrate communication between different active objects of a sequence diagram – Used when an object needs • to activate a process of a different object • to give information to another object A message is represented by an arrow between the life lines of two objects. – Self calls are allowed A message is labeled at minimum with the message name. – Arguments and control information (conditions, iteration) may be included.
  • 20. Types of Messages  Synchronous (flow interrupt until the message has completed)  Asynchronous (don’t wait for response)  Flat (no distinction between sysn/async)  Return (control flow has returned to the caller)
  • 21. 21 Types of Messages • Synchronous (flow interrupt until the message has completed. • Asynchronous (don’t wait for response) • Flat – no distinction between sysn/async • Return – control flow has returned to the caller.
  • 22. Other Elements of Sequence Diagram  Lifeline  Focus of control (activation box or execution occurrence)  Control information  Condition, repetition
  • 23. Sequence Diagram  Lifeline  Denotes the life of actors/objects over time during a sequence  Represented by a vertical line below each actor and object (normally dashed line)  For temporary object  place X at the end of the lifeline at the point where the object is destroyed
  • 24. Sequence Diagram  Focus of control (activation box)  Means the object is active and using resources during that time period  Denotes when an object is sending or receiving messages  Represented by a thin, long rectangular box overlaid onto a lifeline
  • 25. Control Information  Condition  syntax: ‘[‘ expression ’]’ message-label  The message is sent only if the condition is true [ok] borrow(member)
  • 26. 1) Set the context. a) Select a use case. b) Decide the initiating actor. Steps for Building a Sequence Diagram
  • 27. Steps for Building a Sequence Diagram 1. Set the context 2. Identify which objects and actors will participate 3. Set the lifeline for each object/actor 4. Lay out the messages from the top to the bottom of the diagram based on the order in which they are sent 5. Add the focus of control for each object’s or actor’s lifeline 6. Validate the sequence diagram
  • 28. Iterate Iterate the Model • Keep on doing this until you, your customer, and your engineers are happy with the model
  • 29. 2) Identify the objects that may participate in the implementation of this use case by completing the supplied message table. a) List candidate objects. 1) Use case controller class 2) Domain classes 3) Database table classes 4) Display screens or reports Steps for Building a Sequence Diagram
  • 30. Steps for Building a Sequence Diagram 2) Identify the objects (cont.) b) List candidate messages. (in message analysis table) 1) Examine each step in the normal scenario of the use case description to determine the messages needed to implement that step. 2) For each step: 1) Identify step number. 2) Determine messages needed to complete this step. 3) For each message, decide which class holds the data for this action or performs this action 3) Make sure that the messages within the table
  • 31. Steps for Building a Sequence Diagram 2) Identify the objects (cont.) c) Begin sequence diagram construction. 1) Draw and label each of the identified actors and objects across the top of the sequence diagram. 2) The typical order from left to right across the top is the actor, primary display screen class, primary use case controller class, domain classes (in order of access), and other display screen classes (in order of access) 3) Set the lifeline for each object/actor
  • 32. 4) Lay out the messages from the top to the bottom of the diagram based on the order in which they are sent. a) Working in sequential order of the message table, make a message arrow with the message name pointing to the owner class. b) Decide which object or actor initiates the message and complete the arrow to its lifeline. c) Add needed return messages. d) Add needed parameters and control information. Steps for Building a Sequence Diagram
  • 33. 5) Add the focus of control (activation box) for each object’s or actor’s lifeline. 6) Validate the sequence diagram. Steps for Building a Sequence Diagram
  • 34. Summary • Sequence diagrams model object interactions with an emphasis on time ordering • Method call lines – Must be horizontal! – Vertical height matters! “Lower equals Later” – Label the lines • Lifeline – dotted vertical line • Execution bar – bar around lifeline when code is running • Arrows – Synchronous call (you’re waiting for a return value) – triangle arrow-head – Asynchronous call (not waiting for a return) – open arrow-head – Return call – dashed line