UML Collaboration Diagrams
A major task of the design phase is creating the interaction diagrams for the system operations. Read this section to learn more about collaboration diagrams. As you go through the examples, pay attention to general principles in assigning responsibilities.
Ask yourself, how do you determine the relationship between objects? How can you extract the classes? How do you determine whether a mentioned feature can be considered as a class attribute or not? How would you determine class methods?
10. Application of Patterns in Design
Introduction
This activity shows how to apply GRASP patterns to assign responsibilities to object. It does the actual application in a POST case project system. As done by Liu, the design is going to consider "Buy Item with Cash" and "Start Up" use cases.
From activity 4.2, the following can be highlighted as a guideline for making collaboration diagram: The same guideline is summarized in Figure 4.15.
- Create a separate diagram for each system operation which has identified and whose contracts are defined.
- If the diagram gets complex, split it into smaller diagrams.
- Using the contract responsibilities and post-conditions, and use case description as a starting point, design a system of interacting objects to fulfill the tasks.
- Apply the GRASP to develop a good design.
Note that this areas if fully adopting the design made by Liu,
Figure 4.15: Guidelines for design