The second flavor of UML interaction diagram is the collaboration diagram. Semantically equivalent to a sequence diagram, this type of diagram arranges objects spatiallyaccording to the whim of the user creating the diagram. The sequence of interactions is determined from the message numbering. Some people prefer this approach, and better UML tools allow the user to flip a diagram between sequence and collaboration notations and back again as often as they wish. Some organizations have a convention of using collaboration diagrams to show interactions between components and using sequence diagrams to show interactions between classes within a component. Figure 5 shows the collaboration diagram equivalent of the sequence diagram in Figure 2. Figure 6 does the same for Figure 4.
Figure 5 UML collaboration diagram.
Figure 6 Collaboration diagram equivalent of Figure 4.