1 / 9

CRC Cards

CRC Cards. Shon Vick CMSC 445. Introductory Ideas. CRC Cards are an informal technique for exploring initial design Use of the cards is scenario based Once cards (classes) are developed more formal techniques may be more appropriate. Finding Classes.

meda
Download Presentation

CRC Cards

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CRC Cards Shon Vick CMSC 445

  2. Introductory Ideas • CRC Cards are an informal technique for exploring initial design • Use of the cards is scenario based • Once cards (classes) are developed more formal techniques may be more appropriate

  3. Finding Classes • Group discusses a scenario – perhaps from a Use Case • Noun phrases in requirements specification or system description -> classes • Verbs are responsibilities • Model known interfaces to outside world • User interfaces • Interfaces to other programs • Write a description of how people will use the system. This description is a source of interface objects

  4. Format of a CRC Card Class Responsibilities Collaborators

  5. Responsibilities • The knowledge an object maintains • The actions an object can perform • If responsibility can’t be assigned to any card – create a new card • Be wary of any card with a large number of responsibilities

  6. Categories of Classes • Data Managers • Principle responsibility is to maintain data • Examples: stack, collections, sets • Data Sinks or Data Sources • Generate data or accept data and process it further • Do not hold data for long • Examples: Random number generator, File IO classes

  7. More Categories of Classes • View or Observer classes • Example: GUI classes • Facilitator or Helper classes • Maintain little or no state information • Assist in execution of complex tasks

  8. General Guidelines • Consider public responsibilities, not private ones • Specify what gets done, not how it gets done • Keep responsibilities in general terms • Define responsibilities at an implementation-independent level • Keep all of a class's responsibilities at the same conceptual level

  9. References • Wirfs-Brock,Designing Object-Oriented Software, chapters 1- 5 • Mark Lorenz, Object-Oriented Software Development: A Practical Guide, 1993, Appendix I Measures and Metrics • http://www.eli.sdsu.edu/courses/fall97/cs535/notes/OODesign1/OODesign1.html

More Related