1.3.2 How to Read a Sequence Diagram
- This is an activation bar. It signifies that the object is in use and executing a method. An activation bar is the same thing as a method. The top of the block represents the opening curly brace of the method and them bottom of the block represents the closing curly brace.
- This is a method call. This method call in particular would be: this.Planner.ThrowParty(). The activation bar on the Planner object node, then, represents the ThrowParty() method.
- The object being acted upon.
- The Class/Type of the object.
- This represents a method return. The top of the return message has only the Type of thing being returned.
- This represents an object calling a method on the same instance. This method call would be: this.BlowUpBalloon().
- This represents a method return. Unlike 5, because the return is in the same class, it is represented as a colon and the Type at the end of the method.
- This method has a parameter. Parameters are represented in a name: type notation. While this represents a method call, the thing being "passed in" to the method is never noted on a sequence diagram. (i.e. PaintColor("Blue"))
- This method has a parameter like 8, but it's an object not a primitive type.
- Sequence diagrams are read from top to bottom. In this example, the MainWindow calls the Planner's ThrowParty method, then from within the ThrowParty method there is a call to the same instance called BuyBalloon, then from within the BuyBalloons method there is a call to the PartyStore's SellBalloons method that returns an int and then in the ThrowParty method a call to the same instance's BlowUpBalloons method.
- In this example, there are 5 methods being called directly from the ThrowParty method.
- In this example, there are 3 methods returning values.
- In this example, there are 3 methods with parameters.