Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Here is an alternate technique commonly found at this stage of an Object-Oriented Design: CRC Cards. CRC stands for Class, Responsibility, Collaboration. Now we're looking for exactly the same information as in the conceptual object diagram, we're just using a different format, and these are another use of index cards, they're simple, they're easy to create, easy to discuss, hand around, spread across the conference table, and they're easy to dispose of if you make a mistake or change your mind. Each CRC card represents one class.
It has three sections, the first C is the name of the class at the top, usually underlined, the R is the responsibilities of the class, the things that needs to take care of, and C is the Collaborators, the other classes it interacts with. Typically, CRC cards use this format with the responsibilities in the left-hand side two-thirds of the card, and the collaborators on what's remaining on the right. And you can start creating these again from using the nouns in your descriptions to help you identify classes, and the verbs and verb phrases to help you identify say the first responsibilities.
Now, with these responsibilities, you're not worried about official method names, you're just using whatever phrases make sense to say what this class needs to take care of. You can refine these later, some will be combined, some will be split apart. If it's obvious what other classes you're writing are collaborators, meaning what other classes we interact with, you can write those too. But here is the great thing, when you physically start to do this and start creating a pile of CRC cards, most people naturally find themselves starting to move related CRC cards together, and that helps a lot in figuring out the natural collaborators and the way these objects interact.
And that's one reason you shouldn't look for an electronic tool for doing this, it's a place where there is a lot of value in the physicality of moving these around, and as an exercise for helping you think in objects, CRC cards can be very useful. When working through CRC exercises, I've seen people rearrange these cards on a desk and then point to the gap where they're going to put this new class they haven't written yet. The other benefit of using the cards is an enforced constraint. As with using index cards for user stories, you can just keep adding more and more to these.
If you need more than one CRC card for a class, particularly if you're using 4 inch by 6 inch index cards, it's a clue that you may need to redesign that class. But whether you use CRC cards, conceptual diagrams, or a method of your own choosing, you should be able to leave this phase of the design process with at least the names and the core responsibilities of the first set of classes you intend to build in code. But before we start writing, we do need to flesh those ideas out, and that's next.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 105324 Viewers
56 Video lessons · 117066 Viewers
71 Video lessons · 86276 Viewers
131 Video lessons · 41236 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.