Intro to CRC Cards

Intro to CRC

CRC (Class-Responsibility-Collaborator) Card Modeling is a simple yet powerful object-oriented analysis technique.  CRC modeling often includes the users, analysts, and developers in a modeling and design process, bringing together the entire development team to form a common understanding of an OO development project.

It is one of many tools that should be used in the collaborative design of a system.

Kent Beck and Ward Cunningham first introduced CRC cards at OOPSLA ’89 in their paper “A Laboratory for Teaching Object-Oriented Thinking”.  Originally their purpose was to teach programmers the object-oriented paradigm.  The technique has since been refined to become valuable beyond the education curriculum.

A CRC Model is a collection of cards (usually standard index cards or larger) that are divided into three sections.

  1. Class
  2. Responsibility
  3. Collaborator
  • Figure 1: CRC Card Layout

The back of the CRC card is often used for a more detailed description of the class. Along with any other notes captured during the CRC session.  Many times these include the actual attributes of the class.

Class

A Class represents a collection of similar objects.  Objects are things of interest in the system being modeled.  They can be a person, place, thing, or any other concept important to the system at hand.  The Class name appears across the top of the CRC card.

Responsibility

A Responsibility is anything that the class knows or does.  These responsibilities are things that the class has knowledge about itself, or things the class can do with the knowledge it has.

For example, a person class might have knowledge (and responsibility) for its name, address, and phone number.  In another example an automobile class might have knowledge of its size, its number of doors, or it might be able to do things like stop and go.  The Responsibilities of a class appear along the left side of the CRC card.

Collaborator

A Collaborator is another class that is used to get information for, or perform actions for the class at hand.  It often works with a particular class to complete a step (or steps) in a scenario.  The Collaborators of a class appear along the right side of the CRC card.


Download: Intro to CRC

Leave a Reply