Java Reference
In-Depth Information
Sequence Diagram
A sequence diagram is used to model dynamic aspects of the system by depicting the
message exchange between the objects in the system over a period of time. A sequence
diagram is used to show the sequence of interactions that take place between different
objects to fulfill a particular use case. Unlike a class diagram that represents the entire
domain model of the application, a sequence diagram can show interaction details of a
particular process only.
Object and Messages
In a sequence diagram, an object is shown with its name underlined in a rectangular box.
The messages are represented by arrows starting on one object and ending on the other.
An object can call a method on itself, which is a self-message and represented by an
arrow starting and terminating on the same object, as shown in Figure 1-14.
Figure 1-14. Lifeline in a sequence diagram
Lifeline
Each object has a lifeline represented by a dashed line going downward from the object
box (as shown in Figure 1-14). It represents the time axis for the entire sequence diagram
with time elapsed measured by moving downward on the lifeline.
Return Values
The messages in a sequence diagram can optionally have a return value , as shown in Fig-
ure 1-15. The createNewPolicy message, for instance, returns a PolicyDetail object.
 
Search WWH ::




Custom Search