15. Communication diagram

Communication diagrams are used to show the messages that flow from one object to another within the system and the order in which they happen.

A communication diagram is fairly similar to an object diagram in that it uses the same graphics for objects, the same line styles to denote inheritance and association.

But in addition, a list of the messaging methods are drawn. The example below shows a notional car navigation system.

UML communication diagram

Each box is an object within the system.

The arrows indicate a message being sent, for example the Mapping object sends a message to the GPS location object asking about the car's current location. If the message needs to include a parameter, then that should be included as well. If it is not obvious what the return type should be then that should also be included.

Another feature of the communication diagram is the ability to track the ultimate source of a message. This is done by prefixing the messages with a sequence number. You can use a decimal system to denote various levels.

For example, the third message from the display screen is '3 getJourneyData()' this goes to the JourneyCalculations object. In order for the journeyCalculation to be able to respond, it sends two messages out, 3.1 getCurrentLocation() to the GPS location object and another one 3.2 getDestinationLocation() to the Destination details object. It is now simple to see how the messages relate to one another.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: UML communication diagram

 

 

 

Copyright © www.teach-ict.com