You are on page 1of 10

Object Oriented Software Engineering

(OOSE)

Lecture 13
UML Sequence Diagram
Recap
• UML
• Use Case Diagram
• Class Diagram
Outline
• UML Sequence Diagram
• Representation of Objects
• Messages in Sequence Diagram
• Case Study
UML Sequence Diagrams

Kind of Interaction Diagram.


Shows dynamic view of system.

Used during requirements analysis


To refine use case descriptions
to find additional objects (“participating objects”)
Used during system design
to refine subsystem interfaces
UML Sequence Diagrams
Objects
•Objects laid near top of diagram from left to right.
•Objects Lifeline
•activation
UML Sequence Diagrams
Message
Message goes from one object to another goes from one object
lifeline to another object lifeline.

1. Synchronous Messages
sender waits for the receiver
UML Sequence Diagrams
2. Asynchronous Messages
sender transfers control to receiver and does not wait for
operation to complete.

3. Self Message
A message an object sends to itself, usually shown as a U shaped
arrow pointing back to itself.
UML Sequence Diagrams
4. 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.

5. Delete Message
This is a message that destroys an object. It can be shown by an
arrow with an x at the end.
UML Sequence Diagrams

6. Found Message
A message sent from an unknown sender, shown by an arrow
from an endpoint to a lifeline.

7. Lost Message
A message sent to an unknown recipient. It's shown by an arrow
going from a lifeline to an endpoint.
Creation and Destruction

ChangeProcessor
Passenger
Creation
createTicket(selection)

Ticket
print()

free()
Destruction

• Creation is denoted by a message arrow pointing to the object.


• Destruction is denoted by an X mark at the end of the destruction activation.
• In garbage collection environments, destruction can be used to denote the end
of the useful life of an object.

You might also like