CRC Cards

Components can be easily described using a device called a CRC card. A CRC card is simply an index card on which we record three categories of information.

The first is the component name. The second is the list of behaviors, the set of responsibilities we have assigned to this component. And the third is the list of collaborators, the other components on which this component depends in order to perform its assigned tasks.

The nice thing about using index cards for this purpose is that they are inexpensive, and erasable. This permits, even encourages experimentation and alternative design. That fact that they are physical makes the imagined application seem more real, since there is an actual representation for the component.

In multiperson projects a good way to walk through senerios is to assign different components to different members of the team. An object, such as a ball or a stick, can then represent control of the processor. The senerio then procedes by having a component ``perform'' some action, usually involving passing control to another object.

[audio] 13 [real] 13 Text to accompany slide 13, in Chapter 2 of An Introduction to Object-Oriented Programming