OO diagrams - the sequence diagram
A sequence diagram shows how the different objects in a system interact with each other. it shows the objects in the system, the order that the interactions happen in and the processes that occur as a result.
There are various symbols used In sequence diagrams.
* instances of objects are shown at the top with a dashed line descending from the center of the name.
* Processes are shown as vertical boxes.
* Interactions or messages (methods) being passed between the processes are shown as arrows in the order that the messages are passed, starting from the top.
In the example on the left, you can see a typical sequence diagram for the withdrawal of money from an ATM machine. You can see the objects that communicate with each other at the very top of the diagram. Dotted lines fall from the center of each object's name. These are known as the object's life lines and simply allow the reader to have a point of reference for each object.
Each message is identified with a reference number and is represented by an arrow.
Each message has a short description, identifying the purpose of the message.
Arrows flow from the one vertical dotted line (an object) to another vertical dotted line (another object).
Messages flow downwards from the top of the diagram in the order that they occur.
A message typically flows into a black box. This is the symbol used when some code associated with the object is actually running and doing some processing, usually because it has been triggered by a message being received.