Sunday, June 1, 2008

Identifying Classes and Objects from a Requirement Spec. - Presentation

CRC Cards

Class Responsibility Collaborator (CRC cards) are a brainstorming tool used in the design of object-oriented software. They were proposed by Ward Cunningham and Kent Beck. There original purpose was to teach programmers the object-oriented paradigm.

Why uses CRC cards?

  • They are portable... No computers are required so they can be used anywhere. Even away from the office.
  • They allow the participants to experience firsthand how the system will work. No computer tool can replace the interaction that happens by physically picking up the cards and playing the role of that object...
  • They are a useful tool for teaching people the object-oriented paradigm.

What is a CRC CARD?

Nothing more than a blank card of 6 X 4 inches. In that card, you can draw a table something like this

By reading the spec you will come across nouns. For each nouns that you feel that can be a class, allocate a card and write the class name on top. Then reading further you will find the thing that can be done or has to be done by that class. Those are the responsibilities. Write down those responsibilities in the relevant cards. There are other classes that this class will communicate or this class should know that “there is a class like this”. Those are called collaborators. Write class names of the collaborators under the collaborator column.

No comments: