CSCI 211 - Object-Oriented Analysis and Design
How to create CRC - Class, Responsibility and Collaborator Cards
![]()
Each CRC Card contains 3 major components:
At the top of the card, the name of the class appears
The class responsibilities appear as a column below the class name on the left-hand side of the card
The collaborators - the classes that interact with a class to assist in carrying out responsibilities, appear as a column below the class name on the right-hand side of the card
Notes: The responsibilities of a class are what operations the class can perform, taken at a high level in the first iteration of design.
Develop your CRC cards while talking through your use cases, add responsibilities if they seem the reasonable duty of a class. If a task needs to be done, but no class has the responsibility for it, figure out which class (existing or new) it should be assigned to.
Collaborators get sent messages or send messages in a collaboration. This is modeled as an association in the class diagram, once the class diagram is created.
E.G. From the Car Rental Business -
| Rental Customer | |
|---|---|
| Responsibilities | Collaborators |
| Reserve a Car | Rental Agent |
| Pick up a Car | Car |
| Return a Car | Rental Location |
| Cancel Reservation | |
| Maintain Customer Data | |