Page 289 -
P. 289
256 Part 3 • the analysis Process
COnsULting OppOrtUnity 10.1
Around the World in 80 Objects
Because you have described the advantages of using object- Use the CRC cards technique to list classes, responsibili-
oriented (O-O) approaches, Jules and Vern, two top executives at ties, and collaborators.
World’s Trend, would like you to analyze their business using this Use the Object Think technique to list “knows” and cor-
approach. You can find a summary of World’s Trend business activ- responding attributes for the objects in those classes identi-
ities in Figure 7.15. Notice also the series of data flow diagrams fied in the previous stage.
in that chapter to help you conceptualize the problem and begin Write up both steps and fly over to World’s Trend head-
making the transition to Object Think. quarters with your report in hand. Clearly, Jules and Vern are
Because you are such good friends with Jules and Vern and hoping for a fantastic voyage into the new world of object-
because you wouldn’t mind getting a little practical experience using oriented methods.
O-O thinking, you agree to apply what you know and give them
a report. Once you have reread the business activities for World’s
Trend, provide a timely review by completing the following tasks:
Program code reuse has been a part of structured systems development and programming
languages (such as COBOL) for many years, and there have been subprograms that encapsulate
data. Inheritance, however, is a feature that is found only in object-oriented systems.
CRC Cards and Object Think
Now that we have covered the fundamental concepts of object-oriented systems analysis and
design, we need to examine ways to create classes and objects from the business problems and
systems we are facing. One way to begin enacting the object-oriented approach is to start think-
ing and talking in this new way. One handy approach is to develop CRC cards.
CRC stands for class, responsibilities, and collaborators. An analyst can use these concepts
when beginning to talk about or model a system from an object-oriented perspective. CRC
cards are used to represent the responsibilities of classes and the interaction between the classes.
Analysts create the cards based on scenarios that outline system requirements. These scenarios
model the behavior of the system under study. If they are to be used in a group, CRC cards can
be created manually on small note cards for flexibility, or they can be created using a computer.
We have added two columns to the original CRC card template: the Object Think column
and the property column. The Object Think statements are written in plain English, and the prop-
erty, or attribute, name is entered in its proper place. The purpose of these columns is to clarify
thinking and help move toward creating UML diagrams.
Interacting During a CRC Session
CRC cards can be created interactively with a handful of analysts who can work together to iden-
tify the class in the problem domain presented by the business. One suggestion is to find all the
nouns and verbs in a problem statement that has been created to capture the problem. Nouns usu-
ally indicate the classes in the system, and responsibilities can be found by identifying the verbs.
With your analyst group, brainstorm to identify all the classes you can. Follow the standard
format for brainstorming, which is not to criticize any participant’s response at this point but
rather to elicit as many responses as possible. When all classes have been identified, the analysts
can compile them, weed out the illogical ones, and write each one on its own card. Assign one
class to each person in the group, who will “own” it for the duration of the CRC session.
Next, the group creates scenarios that are actually walk-throughs of system functions by tak-
ing desired functionality from the requirements document previously created. Typical systems
methods should be considered first, with exceptions such as error recovery taken up after the
routine ones have been covered.