Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 8

CRC Cards (class-responsibility-collaborator)

CRC Cards

Wolfgang Pelz 2000-04

CRC Cards
introduced in 1989 by Kent Beck and Ward Cunningham designed to teach object oriented programming at Tektronix a CRC card is an index card in a group setting used to represent:
a class of objects their behavior their interactions
CRC Cards Wolfgang Pelz 2000-04
2

CRC Card format

CRC Cards

Wolfgang Pelz 2000-04

CRC definitions
responsibility: knowledge class maintains or service class provides
collaborator: a class whose knowledge or services are needed to fulfill a responsibility

CRC Cards

Wolfgang Pelz 2000-04

Methodology
involves a creative exchange:
physical simulation of the workings of the system participants become one or more objects during walk-throughs of typical scenarios classes are discovered and converted into cards responsibilities are assigned collaborators for each responsibility are identified

CRC Cards

Wolfgang Pelz 2000-04

Advantages
portable: cards can be used anywhere, even away from the computer or office anthropomorphic: no computer program can capture the essence of the interactions forced by passing the cards level of involvement felt by each team member increases useful throughout the life cycle
CRC Cards Wolfgang Pelz 2000-04
6

More advantages
provides a basis for more formal analysis and design methodologies serves as input to a formal method (i.e., a starting point) ease the transition from process orientation to object orientation - most formal methods are overwhelming gives a general bound on the size of a class - a card
CRC Cards Wolfgang Pelz 2000-04
7

Exercise
create CRC cards for some classes in your project.

CRC Cards

Wolfgang Pelz 2000-04

You might also like