View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Sum2003 Midterm Review: CRC

1. CRC cards are small cards used to help a programmer design his project. They help you get ideas of what classes you may need (all nouns should be put on a CRC card). They were invented by Ward Cunningham and Kent Beck. It describes the class's responsibilities and who it collaborates with.

2. CRC cards are used to "play" around with design and walk through scenerios.

3. Card1: name= Item; Responsiblities= Know its item number, name, price; Collaborators=Order, Inventory, Salesperson, Customer.
Card2: name= Customer; Responsiblities= Know its information (credit card number and shipping address) He should know which items and quantities he wants; Collaborators= Item, Salesperson, CreditCard.
Card3: name= MailOrderCompany; Responsiblities= send out order and has a salesperson; Collaborators= Inventory, Salesperson.
Card4: name= SalesPerson; Responsiblities= get user's information and be able to create an order based on the items the customer wants; Collaborator= Inventory, Customer, Order, Item, CreditCard.
Card5: name= CreditCard; Responsiblities= credit card number, expiration date, and billing address; Collaborator= Customer, Salesperson.
Card6: name= Order; Responsiblities= have a running total of the items already ordered, a shipping estimate, and a confirmation number; Collaborators= Item, Salesperson.
Card7: name= Inventory; Responsiblities= Know if an item is in stock; Collaborators= MailOrderCompany, Item.

Collaborators should be who the current card needs to work with to accomplish the responsiblities, not everyone who needs the class. Barbara Ericson


1) CRC cards stand for Class Responsibility Collaboration cards. They show how classes interact and provide services with/for one another while performing various scenario tasks. They were invented by Ward Cunningham and Kent Beck. They are used as a concrete way to show object-oriented analysis.

2) First you make a list of all of the nouns in your system. Then you write down the responsibilities of each class on the left side of the card and any collaborator classes that this class needs to use to accomplish this task on the right side of the card.

Yes, Mandy and Brittany. Good job Barbara Ericson

3) There should be a CRC card for each of the following classes, which represent the main nouns in the system that are not actors or attributes of other nouns:


2) To "play" with the cards you run through a believable scenario and lay cards down as they come up, taking them off the stack once their responsiblities are over.


Yes, this is a way you use the cards Barbara Ericson

1. CRC cards are cards that enable us to define the responsibilities for each class defined. Ward Cunningham and Kent Beck invented them. They show how classes interact with one another while performing scenario tasks. They show responsibility and collaborators.

2. After going through the task, all nouns are defined. Looking at the scenarios, you see who is doing what and with whom they need to work. This way you can define the responsibilities of certain classes and their collaborators. If there are some nouns that can be merged with others, then you get rid of those unnecessary ones.

3. Listing all the nouns, there should be:
~Sabina Karkin
Good Sabina but why call Item ItemInfo? Barbara Ericson

Link to this Page