Class-responsibility-collaboration (CRC) cards are a
brainstorming tool used in the design of
object-oriented software. They were originally proposed by
Ward Cunningham and
Kent Beck as a teaching tool
but are also popular among expert designers
[Martin Fowler, ''UML Distilled'', chapter 4] and recommended by
extreme programming practitioners.
[A concise introduction at extremeprogramming.org](_blank)
/ref> Author Martin Fowler has written that CRC cards may be a sensible means by which multiple alternative interactions may be quickly devised, as they avoid a great deal of drawing and erasing. CRC card sessions may be followed by the creation of sequence diagrams to capture interactions that are identified.
CRC cards are frequently employed during the design phase of system and software development to transition use-case descriptions into class diagrams, allowing a smoother transition with a greater overview and permitting developers to implement solutions with low binding and high cohesion.
CRC cards are usually created from index card
An index card (or record card in British English and system cards in Australian English) consists of card stock (heavy paper) cut to a standard size, used for recording and storing small amounts of discrete data. A collection of such cards ei ...
s. Members of a brainstorming session will write one CRC card for each relevant class/object of their design. The card is partitioned into three areas:
# On top of the card, the class name
# On the left, the responsibilities of the class
# On the right, collaborators (other classes) with which the class interacts to fulfill its responsibilities
Using small cards minimizes the complexity of the design, reduces class responsibilities and keeps designers focused on the essentials of the classes without exploring implementation details. Because the cards are portable, they can easily be laid out on a table and rearranged while discussing a design.
Creating CRC cards
Creation of CRC cards normally begins with writing a scenario that identifies the major actors and actions. From the scenario, nouns should become classes, verbs become responsibilities and collaborators are the other cards with which the card will interact.
See also
* Object-oriented design
* Meta-modeling
* Story-driven modeling
* Unified Modeling Language
References
External links
A Laboratory For Teaching Object-Oriented Thinking
paper by Kent Beck and Ward Cunningham
A simple online CRC Editor
{{DEFAULTSORT:Class-Responsibility-Collaboration Card
Extreme programming
Software design