Class Responsibility Collaboration Cards
The basic principle is to create an index card for each class and to note its properties on this. There is no generally valid notation for CRC cards . In general, however, you orientate yourself on the first maps drawn by Ward Cunningham. These consist of three areas:
- at the top is the name of the class
- on the left hand side write down the responsibilities of the class
- on the right side are the classes with which the described class works
There are a number of extensions to the original concept that add additional areas and in some cases also use the back of the cards.
The advantage of CRC cards is that they are easy to use. You can easily add or remove information. Due to the simple approach, you are also independent of the programming languages and tools used. The limited space also forces the developers to concentrate on the essential tasks of a class.
Relations between the classes can be illustrated in different ways. Either you write the names of the classes you dealt with on the card, or you do z. B. the cards on a wall and draw lines between the cards.
The name of the class and that of the super class (if any) are noted on the front of the card. In addition, the area of responsibility and the relationship to other classes are briefly described.
|Name of the class||Super great|
Area of responsibility
The class is described in more detail on the back using a list of operations and attributes.
Only the essentials of a class should be noted on CRC cards. The class name is usually listed first. The map is only added in the analysis phase, when more information about the class is available. If there is no longer any need, you can delete information or even remove a complete card.
- Kent Beck, Ward Cunningham: A Laboratory For Teaching Object-Oriented Thinking .
- Ward Cunningham: A CRC Description of HotDraw . The first CRC cards drawn by their inventor.
- Ulli Gellesch: Introduction to working with CRC cards .