(^278) | Object-Oriented Software Design and Implementation
them. The proposed classes are written on a board. None of the ideas for classes are discussed
or rejected in this first stage.
For example, suppose we have the following problem statement: Create an application
that mimics a physical address book for holding names, addresses, and other information
about friends, relatives, and business contacts.
We begin by looking at a physical address book and then brainstorm with our teammates
about what we see there. We decide that our application has the following potential objects:
Some of these items are clearly not a part of our solution, such as the user. The purpose
of brainstorming, however, is to generate ideas without any inhibitions. Once we’ve run out
of ideas, we move on to critiquing them.
Filtering
After brainstorming, we filter the classes. First, we eliminate duplicates. Next, we decide
whether each class really represents an object in the problem. The team then looks for
classes that seem to be related. Perhaps they aren’t duplicates, but they have much in com-
mon, and so they are grouped together on the board. At the same time, the discussion may
reveal some classes that were overlooked.
For each class that survives the filtering stage, we create a CRC card. The CRC card is just
an index card with a line drawn vertically down the middle. The name of the class is writ-
ten at the top and the two columns have the headings Responsibilitiesand Collaborations.
Figure 6.3 shows a blank CRC card.
We have added spaces at the top of the CRC card for naming the superclass and sub-
classes of the class. These items are discussed in Chapter 7. Recalling our example of the