Sequence Diagram August 15, 2017: Objective
Sequence Diagram August 15, 2017: Objective
OBJECTIVE:
Generate a Sequence Diagram for ATM System.
DESCRIPTION:
We have two types of interaction diagrams in UML. One is sequence diagram and
the other is a collaboration diagram. The sequence diagram captures the time
sequence of message flow from one object to another and the collaboration
diagram describes the organization of objects in a system taking part in the
message flow.
Purpose:
1. To capture dynamic behavior of a system.
2. To describe the message flow in the system.
3. To describe structural organization of the objects.
4. To describe interaction among objects.
Sequence Diagram August 15, 2017
Class roles describe the way an object will behave in context of the system. Use
the UML object symbol to illustrate class roles, but don't list object attributes.
Actor Symbol
Represented by a stick figure, actors are entities that are both interactive with and
external to the system.
Messages
Messages are arrows that represent communication between objects. Use half-
arrowed lines to represent asynchronous messages. Asynchronous messages are
sent from an object that will not wait for a response from the receiver before
continuing its tasks. For message types, see below
Sequence Diagram August 15, 2017
Lifelines
Lifelines are vertical dashed lines that indicate the object's presence over time.
Destroying Objects
Objects can be terminated early using an arrow labeled "<< destroy >>" that points
to an X. This object is removed from memory. When that object's lifeline ends, you
can place an X at the end of its lifeline to denote a destruction occurrence.
Sequence Diagram August 15, 2017
Loops
A repetition or loop within a sequence diagram is depicted as a rectangle. Place the
condition for exiting the loop at the bottom left corner in square brackets [ ].
Types of Messages in Sequence Diagrams:
Synchronous Message
A synchronous message requires a response before the interaction can continue. It's
usually drawn using a line with a solid arrowhead pointing from one object to
another.
Asynchronous Message
Asynchronous messages don't need a reply for interaction to continue. Like
synchronous messages, they are drawn with an arrow connecting two lifelines;
however, the arrowhead is usually open and there's no return message depicted.
Self Message
A message an object sends to itself, usually shown as a U shaped arrow pointing
back to itself.
Sequence Diagram August 15, 2017
Create Message
This is a message that creates a new object. Similar to a return message, it's
depicted with a dashed line and an open arrowhead that points to the rectangle
representing the object created.
Delete Message
This is a message that destroys an object. It can be shown by an arrow with an x at
the end.
Found Message
A message sent from an unknown recipient, shown by an arrow from an endpoint
to a lifeline.
Lost Message
A message sent to an unknown recipient. It's shown by an arrow going from a
lifeline to an endpoint, a filled circle or an x.
Sequence Diagram August 15, 2017