KARABUK UNIVERSITY
Computer Engineering Department
CPE 310 Software Engineering
Lab#11
Requirements Modeling
The Sequence Diagram
Hasan Kivrak
Sequence diagram
● describes the interactions between objects to fulfill a specific task
○ specifies how messages and data are exchanged between interaction partners
○ the focus is on the chronological order of the messages exchanged between the interaction
partners.
● examples of interactions
○ Conversation between persons
○ Message exchange between humans and a software system
○ Communication protocols
○ Sequence of method calls in a program
○ …
Sequence diagram
● Two-dimensional diagram
○ Horizontal axis: involved interaction
partners/objects
○ Vertical axis: chronological order of the
interaction
■ Represents the lifetime of the object
associated with it
● Interaction = sequence of event specifications
Exchanging Messages (1/2)
● Interaction: sequence of events
● Message is defined via send event and
receive event
● Execution specification
○ continuous bar
○ used to visualize when an
interaction partner executes some
behavior
Exchanging Messages (2/2)
Order of messages:
Messages(1/2)
● Send Message
○ Continuous filled-arrowed
● Response message
○ dashed open-arrowed
● Object creation
○ dashed open-arrowed with keyword new
● Object destruction
○ Object is deleted
○ Large cross (×) at the end of the lifeline
Messages(1/2) - Examples
Messages(2/2)
● Conditional and looping messages
○ a frame (operators) is placed around
one or more messages
■ UML offers 12 different types of operators
○ Describe a number of possible
execution paths
Reference frames
● Reference frames are used to simplify a diagram and factor out a portion into
another diagram