CSC/ECE 517 Fall 2009/wiki3 10 pz

From Expertiza_Wiki
Jump to navigation Jump to search

CRC Card

Introduction

CRC (Class-Responsibility-Collaborator) Card is a simple yet powerful object-oriented analysis technique. Kent Beck and Ward Cunningham first introduced CRC cards at OOPSLA 1989 in their paper “A Laboratory for Teaching Object-Oriented Thinking”. The original purpose of CRC Card was to teach the object-oriented programming at Tektronix.

A sample of CRC card

The CRC Card is composed of three components: Class; Responsibity; Collaborator.

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.

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.