Sequence Diagram   «Prev 

Example Sequence Diagram using UML

Sequence diagram

Sequence diagrams are used to capture time ordering of message flow and collaboration diagrams are used to understand the structural organization of the system. Generally a set of sequence and collaboration diagrams are used to model an entire system
A sequence diagram shows elements as they interact over time, showing an interaction or interaction instance. Sequence diagrams are organized along two axes:
  1. the horizontal axis shows the elements that are involved in the interaction, and
  2. the vertical axis represents time proceeding down the page.
The elements on the horizontal axis may appear in any order.

  1. Anonymous object: Objects for which no name is obvious or needed. Anonymous objects are commonly used in diagrams that show one object contained in another object; they can also be used to show samples of an object that may not be used in any particular part of the code.
  2. Basic comment
  3. Condition: Boolean value of true or false
  4. Event/message: The event is Order()
  5. Event signature: contains 1 parameter; addProduct(characters)
  6. Iteration comment
  7. Object name: Inventory
  8. Return: The information returned by a method to whatever called it. It may be a programmer-defined data type or a primitive type. A method that does not return a value is called void.
  9. Sequence number
  10. Self-reference
  11. Timeline