User:NcsuOO517

From Expertiza_Wiki
Revision as of 20:41, 1 September 2010 by NcsuOO517 (talk | contribs) (→‎Sources)
Jump to navigation Jump to search

Class Responsibility Collaboration (CRC) Cards

Overview

A Class Responsibility Collaboration card session is a useful procedure in designing object-oriented programs. CRC cards provide a visual layout of how a program can be divided up into classes to optimize efficiency and organization.

History

CRC Cards were invented by Kent Beck and Ward Cunningham in 1989 when object-oriented programming was a new concept for most programmers. They used the cards to teach object-oriented design in a way that procedural programmers could understand. As OO programming became more popular, the use of CRC cards expanded. Their ease of use and ability to represent an entire program's functionality and interactions make them helpful for multiple stages of design; consequentially, they are now commonly used as a routine part of the software development process.

What does a CRC card look like?

Basics

A CRC card is an index card that is divided into three sections: Class at the top, Responsibilities on the left and Collaborators on the right.

File:CRCbasic.jpg

Class - The name of the object the CRC card represents.

Responsibilities - The functions the class should implement. These typically correspond to the methods to be included in the class.

Collaborators - A list of other classes that the current class will interact with.

Variations

Just as there are variations in any software development process, some CRC cards have other features implemented.

Main Responsibility - Defines the sole function of a class. As there should only be one clearly defined main responsibility, this field is often useful in determining if a class should be split up into two or more individual classes. It is typically featured underneath the Class box.

Attributes - The attributes the class should have. These typically correspond to the instance variables to be included in the class. If attributes are included, they are featured on the back of the index card.

A CRC Card Session

Example

References

1. Wilkinson, Nancy M. Using CRC Cards: An Informal Approach to Object-Oriented Development. Cambridge University Press, 1998.

2. Williams, Laurie. CRC Cards. 2006. [1]