Program 9
Objective: Draw a Collaboration diagram for E-commerce Book Management System.
Collaboration Diagram
A collaboration diagram, also known as a communication diagram, is a type of interaction
diagram in the Unified Modelling Language (UML). It illustrates how objects interact to
accomplish specific tasks or achieve a particular goal within a system. Collaboration diagrams
emphasize the structural organization of objects and the messages exchanged between them to
accomplish a task.
Components and concepts within a collaboration diagram
Objects
Objects represent instances of classes or entities within the system being modelled. Each object
is depicted as a rectangle with the object's name at the top.
Links
Links are depicted as solid lines connecting objects. They represent the relationships or
associations between objects. Links can be un-directional or bi-directional, indicating the flow
of communication between objects.
Messages
Messages are shown as arrows along the links and represent communication between objects.
Messages are annotated with labels to indicate the nature of the communication, such as method
calls, signals, or events. They often include the name of the method being invoked and any
parameters passed during the interaction.
Roles
Roles specify the responsibilities or behaviours of objects within a collaboration. They are
usually represented as text labels attached to the objects. Roles clarify the purpose of each
object in the collaboration and help define their interactions.
Interaction Occurrences
Interaction occurrences denote specific instances of interactions between objects. They are
often represented as numbered markers along the links, indicating the sequence or order of
message exchanges during the collaboration.
Constraints
Constraints are optional annotations added to the diagram to specify conditions or constraints
that must be satisfied during the interaction. Constraints provide additional information about
the behaviour or requirements of the system.
Fig 9.1 Collaboration Diagram for E-commerce Book Management System