Analysis: Communication Diagrams



index
Disabled back button Next Section
printable version




Section 0: Module Objectives or Competencies
Course Objective or Competency Module Objectives or Competency
The student will be able to assess and apply Object-Oriented analysis and design methods like use cases to express user requirements, UML modeling, and other OO approaches. Understand the rules and style guidelines for communication diagrams.
Understand the processes used to create communication diagrams.
Be able to create communication diagrams.


Section 1: Overview

The behavior of a use case can be described by means of activity diagrams and state diagrams, interaction diagrams (sequence and communication diagrams), as well as textual use cases, where appropriate.

A communication diagram, also called a collaboration diagram, can show how the members of a set of objects collaborate to implement a use case or a use case scenario.

Communication diagrams emphasize the flow of messages through a set of objects, whereas the sequence diagrams focus on the time ordering of the messages being passed.

A communication diagram helps to understand the flow of control over a set of collaborating objects or to understand which objects collaborate to support business processes.


This video discusses the transition from Sequence Diagrams to Communication Diagrams:

The next video contrasts Sequence vs. Communication Diagrams :



Section 2: Example

Recall the activity diagram for making a School Lunch from the last chapter.

Example of an Activity Diagram.

That was followed by the sequence diagram derived from that scenario:

Example of a sequence Diagram.

The following figure shows a communication diagram for making a School Lunch:

Example of a communication Diagram.

Differences

The diagram above is equivalent to the sequence diagrams for making a school lunch.

Simplification

When a communication diagram is fully populated with all the objects, it can become very complex and may need to be simplified through the use of packages (i.e., logical groups of classes).



Section 3: Syntax and Elements
Communication diagram syntax.

Elements of a Communication Diagram

Actors and objects

Actors and objects

Differences

Association

An association is shown between actors and objects with an undirected line.

Conditional Messages

Like the sequence diagram, the communication diagram can represent conditional messages. The condition is indicated in square brackets preceding the message, and the message is sent only if the condition is met.

Repeated Messages

If a message is repeatedly sent, an asterisk is placed after the sequence number.

Self-Delegation Messages

Self-delegation is shown as an association that loops onto an object. The message is shown as the label of the association.



Section 4: Example 2

Recall the Make Old Patient Appointment.

The following is a communication diagram for the Make Old Patient Appt use case, which describes the process by which an existing patient creates a new appointment or cancels or reschedules an appointment for the doctor’s office appointment system. In this specific instance, the Make Old Patient Appt process is portrayed.

Sequence Diagram for Make Appointment.

Note that the LookupBills() message is conditional and is sent only if the [aPatient exists] condition is met.



Section 5: Guidelines for Creating Communication Diagrams


Section 6: Creating a Communication Diagram

The following is a five-step process used to create a communication diagram.

Remember that a communication diagram is basically an object diagram that shows message-passing relationships instead of aggregation or generalization associations.



Section 7: Resources