17.5. What's the Connection Between Responsibilities, GRASP, and UML Diagrams?
You can think about assigning responsibilities to objects while coding or while modeling. Within the UML, drawing interaction diagrams becomes the occasion for considering these responsibilities (realized as methods).Figure 17.2 indicates that Sale objects have been given a responsibility to create Payments , which is concretely invoked with a makePayment message and handled with a corresponding makePayment method. Furthermore, the fulfillment of this responsibility requires collaboration to create the Payment object and invoke its constructor.