Communication Diagrams
Figure 25.23 shows a communication diagram that models the ATM executing a
Balance Inquiry. Objects are modeled in the UML as rectangles containing names in the
form object Name: Class Name. In this example,which involves only one object of each
type, we dis regard the object name and list only a colon followed by the class name. [ Note:
Specifying the name of each object in a communication diagramisrecommendedwhen
modelingmultiple object sof the same type.] Communicating objects are connected with
solid lines, and messagesare passed between objects along these lines in the direction
shown by arrows.The name of the message,which appears next to the arrow, is thename
of an operation (i.e.,a member function) belonging to the receiving object—think of the
name as a service that the receiving object provides to sending objects(its “ clients”).