Professional Documents
Culture Documents
Scenarios
• A scenario is a sequence of events that occurs during one
particular execution of a system.
An Object : a Class
2. AN OBJECT
usually dashed line that represents the lifetime of the object associated with
3. A LIFELINE it. At the top end of the line is the head of the lifeline, a rectangle which
contains an expression in the form roleName:Class
4. A FOCUS OF CONTROL
5.
In a sequence diagram, a message is depicted as
a Message() an arrow from the sender to the receiver.
A MESSAGE
6. OBJECT DESTRUCTION x
General Sequence Diagram
• It is composed of a
diagram frame:
1) with an identifier name
order process
2) the individual
participants (classes) in
client order inventory
the form of “lifeline”
composed of:
• A rectangle depicting
create
the participating
object locate item
• A dotted line that
extends for the time
period of the
interaction
3) messages to
communicate among the
participants
Example of Analysis Level UML Sequence Diagram
Basic Structure of UML sequence Diagram
Central contrl
In case (b), the student registers
In case (a), the registration is via e- with the professor personally and
mail, that is, asynchronous. The the communication is therefore
student does not explicitly wait for the synchronous.
receipt of the confirmation message. The student waits until receiving
a response message.
• ALT : operator has at least two operands. Each operand represents an
alternative path in the execution, which corresponds approximately to
multiple cases in programming languages, for example, the switch
statement
• OPT : the opt operator thus represents an interaction sequence whose
actual execution at runtime is dependent on the guard. In a programming
language, this operator would be specified as an if statement without an else
branch
• LOOP: the loop fragment to express that a sequence is to be executed
repeatedly The keyword loop is followed by an optional specification of the
number of iterations of the loop
UML Sequence Diagram
(Coursera course video)
• https://www.youtube.com/watch?v=7JyUQ
L0KQ4w&ab_channel=PhamThuyHang
Sequence Diagram
The Connection between a
Class Diagram and a
Sequence Diagram
Consider the Class diagram
• The student administration system has
direct access to all students and courses.
• The system knows the registration data
for students and courses that is stored in the class
Registration.
• To do this, the method newRegistration
of the class StudentAdminSystem must be called
Develop a sequence
diagram showing the
interaction involved
when a student registers
for a course in a
university. Courses may
have limited enrolment,
so the registration
process must include
checks that places are
available.
Assume that student
accesses an electronic
course catalog to find out
about available courses
Example Create a UML Sequence Diagram for the Use
Case “Check out shopping cart”
1. The Customer presses the “Check out”
button
2. The system shows the contents of the
shopping cart and asks for the
Shipping Address
3. The Customer enters the Shipping
Address
4. The system asks for credit card
information
5. The Customer enters credit card
information
6. The system sends the payment
information to the Bank system
7. The Bank system returns transaction
OK
8. The System creates the Order
9. The System sends a notification to the
Deliver man
10. The System shows the Confirmation of
Place Order page