You are on page 1of 7

UML 

communication diagrams, like the sequence diagrams - a kind of interaction


diagram, shows how objects interact. A communication diagram is an extension of object
diagram that shows the objects along with the messages that travel from one to another. In
addition to the associations among objects, communication diagram shows the messages the
objects send each other.

Communication Diagrams
Communication diagrams were introduced in UML 2.0. Their original name in
UML 1.x was collaboration diagrams. Communication diagrams describe the
interactions of two or more things in the system that perform a behavior that is
more than any one of the things can do alone. For instance, a car can be
broken down into several thousand individual parts. The parts are put together
to form the major subsystems of the vehicle: the engine, the transmission, the
brake system, and so forth. The individual parts of the car can be thought of
as classes, because they have distinct attributes and functions. The individual
parts of the engine form a collaboration, because they “communicate” with
each other to make the engine run when the driver steps on the accelerator.

A communication diagram is made up of three parts: objects (also called


participants), the communication links, and the messages that can be passed
along those links. Communication diagrams show the same information as a
sequence diagram but may be more difficult to read. In order to show time
ordering, you must indicate a sequence number and describe the message. A
communication diagram emphasizes the organization of objects, whereas a
sequence diagram emphasizes the time ordering of messages. A
communication diagram will show a path to indicate how one object is linked
to another.

Communication Diagram vs Sequence Diagram

The communication diagram and the sequence diagram are similar. They're
semantically equivalent, that is, the present the same information, and you
can turn a communication to a sequence diagram and vice versa. The main
distinction between them is that the communication diagram arranged
elements according to space, the sequence diagram is according to time.

Of the two types of interaction diagrams, sequence diagrams seem to be used


far more than communication diagrams. So, why would you use
communication diagrams? First of all, they are very useful for visualizing the
relationship between objects collaborating to perform a particular task. This is
difficult to determine from a sequence diagram. In addition, communication
diagrams can also help you determine the accuracy of your static model (i.e.,
class diagrams).
Activity Diagram for Issue Book in
Library :


Activity Diagram for Return Book in Library:-

Sequence diagram for issuing book:


Sequence diagram for returning book:

Collaboration diagram for issuing Book:


Collaboration diagram for returning Book:

You might also like