CSC/ECE 517 Fall 2012/ch1 w43: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
=Introduction=
=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.
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.
The structure of a CRC-card is as shown below.
[[File:CRC_example.jpg]]


A CRC-card corresponds to a '''class'''.
A CRC-card corresponds to a '''class'''.

Revision as of 15:49, 29 September 2012

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.

The structure of a CRC-card is as shown below.

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.