CSC/ECE 517 Fall 2012/ch1 w43

From Expertiza_Wiki
Revision as of 06:29, 29 September 2012 by Smahish (talk | contribs)
Jump to navigation Jump to search

Class-Responsibilty-Collaboration Cards

Class Responsibility Collaboration (CRC) cards are a brainstorming tool used in the design of object-oriented software. They were proposed by and Ward Cunningham and Kent Beck. They are typically used when first determining which classes are needed and how they will interact.

Introduction

CRC-cards are a lightweight approach to collaborative object-oriented modelling that has been developed as a tool for teaching object-oriented thinking to programmers. They have been used widely in various teaching and training contexts.

A CRC-card corresponds to a class.

A responsibility is something the objects of a class know or do as a service for other objects. A book object in a library application, for example, might, among other things, be responsible for checking itself out and knowing its title and due date (see Book in 1). The responsibilities of the objects of a class are written along the left side of the card.

A collaborator is an object of another class "helping" to fulfill a specific responsibility. A book object, for example, can only know whether it is overdue, if it also knows the current date.

The back of the card can be used for a brief description of the class' purpose, comments and miscellaneous details.