Communication Diagrams
Figure 25.23 shows a communication diagram that models the ATM executing a
BalanceInquiry. Objects are modeled in the UML asrectanglescontainingnames i n t he
form objectName: ClassName. I n 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 thenameofeach object in a c ommunication 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”).