You are on page 1of 16

Modern Systems Analysis

Week
and 7
Design
Object-Oriented Analysis and Design:
Sequence Diagrams
Lecturer: Hamid Milton Mansaray
Phone#: +23276563575
Email: hmmansaray@ccmtsl.com
Course Location: Penner Building Room C&D
Time: 4-6pm & 9-11am
Learning Objectives
 Understand how to represent system
logic with sequence diagrams.

2
Dynamic Modeling: Sequence
Diagrams
 Sequence diagram: describe the
interactions among objects during a certain
period of time
 May be presented either in a generic form or in
an instance form.
 Generic form shows all possible sequences of
interactions – sequences corresponding to all
the scenarios of a use case.
 Instance form shows the sequence for only one
scenario.

3
Dynamic Modeling: Sequence
Diagrams (Cont.)
 Elements of a sequence diagram
 Objects: represented by boxes at top of
diagram
 Lifeline: the time during which an object
exists
 Messages: means by which objects
communicate with each other

4
Dynamic Modeling: Sequence
Diagrams (Cont.)
 Activation: the time period during which
an object performs an operation
 Synchronous message: a type of
message in which the caller has to wait for
the receiving object to finish executing the
called operation before it can resume
execution itself

5
Dynamic Modeling: Sequence
Diagrams (Cont.)
 Simple message: a message that
transfers control from the sender to the
recipient without describing the details of
the communication
 Asynchronous message: a message in
which the sender does not have to wait for
the recipient to handle the message

6
Dynamic Modeling: Sequence
Diagrams (Cont.)
 Components of sequence diagram:
 The objects and actors: listed along the top of
the diagram, with a dotted line drawn vertically.
 Annotated arrows: interactions between objects
 The rectangle on the dotted lines: the lifeline of
the object concerned (i.e., the time that object
instance is involved in the computation).
 The annotations on the arrows: the calls to the
objects, their parameters, and the return values.
7
Dynamic Modeling: Sequence Diagrams
(Cont.)
Example sequence diagram for view patient information

8
Dynamic Modeling: Sequence Diagrams
(Cont.)
Example sequence diagram for view patient information
1. The medical receptionist triggers the ViewInfo method in an
instance P of the PatientInfo class, supplying the patient’s
identifier, PID. P is a user interface object, which is
displayed as a form showing patient information.
2. The instance P calls the database to return the information
required, supplying the receptionist’s identifier to allow
security checking.
3. The database checks with an authorization system that the
user is authorized for this action.
4. If authorized, the patient information is returned and a form
on the user’s screen is filled in. If authorization fails, then
an error message is returned.
9
Dynamic Modeling: Sequence Diagrams
(Cont.)
Example sequence diagram to update patient
information

1. The receptionist logs on to the PRS.


2. There are two options available:
a. Allow the direct transfer of updated patient information to the PRS
b. Transfer of summary health data from the MHC-PMS to the PRS.

10
Dynamic Modeling: Sequence Diagrams
(Cont.)
Example sequence diagram to update patient
information

11
Dynamic Modeling: Sequence Diagrams
(Cont.)
Example sequence diagram to update patient
information

3. In each case, the receptionist’s permissions are checked using


the authorization system.
4. Personal information may be transferred directly from the user
interface object to the PRS. Alternatively, a summary record may
be created from the database and that record is then transferred.
5. On completion of the transfer, the PRS issues a status message
and the user logs off.
12
FIGURE 7-38
Sequence diagram for
a class registration
scenario without
prerequisites

13
FIGURE 7-39
A generic sequence
diagram for the prereq
courses not completed
use case

14
FIGURE 7-40
Sequence diagram for
Hoosier Burger’s Hire
employee use case

15
Summary
 In this class you learned:
 How to represent system logic with
sequence diagrams.

16

You might also like