Exercise 5 SEQUENCE DIAGRAM
10.08.2018
AIM:
To draw sequence diagram for the Petrol Pump Management System.
PURPOSE:
A sequence diagram shows object interactions arranged in time sequence. It
depicts the objects and classes involved in the scenario and the sequence of
messages exchanged between the objects needed to carry out the functionality of
the scenario. Sequence diagrams are typically associated with use case realizations
in the Logical View of the system under development. Sequence diagrams are
sometimes called event diagrams or event scenarios. A sequence diagram shows,
as parallel vertical lines (lifelines), different processes or objects that live
simultaneously, and, as horizontal arrows, the messages exchanged between them,
in the order in which they occur. This allows the specification of simple runtime
scenarios in a graphical manner.
NOTATIONS:
TIMELINE:
ACTIVATION BARS: Activation bar is the box placed on the lifeline. It is used to
indicate that an object is active (or instantiated) during an interaction between
two objects.
MESSAGE ARROWS: An arrow from the Message Caller to the Message Receiver
specifies a message in a sequence diagram. A message can flow in any direction;
from left to right, right to left or back to the Message Caller itself.
Synchronous message: As shown in the activation bars example, a synchronous
message is used when the sender waits for the receiver to process the message
and return before carrying on with another message.
Asynchronous message: An asynchronous message is used when the message
caller does not wait for the receiver to process the message and return before
sending other messages to other objects within the system.
Return message: A return message is used to indicate that the message receiver
is done processing the message and is returning control over to the message
caller.
SEQUENCE DIAGRAMS:
1)Main Success Scenario:
2)Alternate Scenario:
a) Absence of Manager
b) Disproportionate working hour preference
3)Sub-functions:
a) Register Users
b) View Personal Information
RESULT:
Thus, the sequence diagram for the Petrol Pump Management System was
drawn.