Collaboration Diagrams


Figure 13-5 is a collaboration diagram depicting the case of treeMap.Add in which topNode is not null. Collaboration diagrams contain the same information that sequence diagrams contain. However, whereas sequence diagrams make the order of the messages clear, collaboration diagrams make the relationships between the objects clear.

Figure 13-5. Collaboration diagram of one case of treeMap.Add


The objects are connected by relationships called links. A link exists wherever one object can send a message to another. Traveling over those links are the messages themselves. They are depicted as the smaller arrows. The messages are labeled with the name of the message, its sequence number, and any guards that apply.

The dot structure of the sequence number shows the calling hierarchy. The treeMap.Add function (message 1) invokes the treeMapNode.Add function (message 1.1). Thus, message 1.1 is the first message sent by the function invoked by message 1.




Agile Principles, Patterns, and Practices in C#
Agile Principles, Patterns, and Practices in C#
ISBN: 0131857258
EAN: 2147483647
Year: 2006
Pages: 272

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net