Lecture 22 – Class responsibility collaboration cards. This chapter presents the following content: Class responsibility collaboration cards, responsibilities and collaborations, knowing responsibilities, doing responsibilities. | SOFTWARE DESIGN AND ARCHITECTURE LECTURE 22 Review Activity Diagram Outline Class Responsibility Collaboration Cards CRC Models Creating CRC Models CRC Cards CRC Cards A CRC card is divided into three sections (Beck & Cunningham, 1989; Ambler, 1995) Responsibilities and Collaborations A responsibility is anything that a class knows or does. Sometimes a class will have a responsibility to fulfill, but will not have enough information to do it. When this happens it has to collaborate with other classes to get the job done. CRC Model A CRC model is a collection of CRC cards that represent whole or part of an application or problem domain. The most common use for CRC models is to gather and define the user requirements for an object-oriented application. Collaborating cards are placed close to each other Perform The Iterative Steps of CRC Modeling Find classes Look for anything that interacts with the system, or is part of the system Ask yourself “Is there a customer?” Follow the money . | SOFTWARE DESIGN AND ARCHITECTURE LECTURE 22 Review Activity Diagram Outline Class Responsibility Collaboration Cards CRC Models Creating CRC Models CRC Cards CRC Cards A CRC card is divided into three sections (Beck & Cunningham, 1989; Ambler, 1995) Responsibilities and Collaborations A responsibility is anything that a class knows or does. Sometimes a class will have a responsibility to fulfill, but will not have enough information to do it. When this happens it has to collaborate with other classes to get the job done. CRC Model A CRC model is a collection of CRC cards that represent whole or part of an application or problem domain. The most common use for CRC models is to gather and define the user requirements for an object-oriented application. Collaborating cards are placed close to each other Perform The Iterative Steps of CRC Modeling Find classes Look for anything that interacts with the system, or is part of the system Ask yourself “Is there a customer?” Follow the money Look for reports generated by the system Look for any screens used in the system Immediately prototype interface and report classes Look for the three to five main classes right away Create a new card for a class immediately Use one or two words to describe the class Class names are singular Perform The Iterative Steps of CRC Modeling Find responsibilities Ask yourself what the class knows Ask yourself what the class does If you’ve identified a responsibility, ask yourself what class it "belongs" to Sometimes get responsibilities that we won’t implement, and that’s OK Classes will collaborate to fulfill many of their responsibilities Perform The Iterative Steps of CRC Modeling Define collaborators Collaboration occurs when a class needs information that it doesn’t have Collaboration occurs when a class needs to modify information that it doesn’t have There will always be at least one initiator of any given collaboration Sometimes the collaborator does the bulk of the work Don’t pass the