Author: gnuhpc
Source: http://www.cnblogs.com/gnuhpc/
1. What is CRC card?
CRC (Class-Responsibility-collaborator) card is a popular object-oriented modeling method. In CRC modeling, users, designers, and developers all participate in the design of the entire object-oriented project.
A crc card is a collection of standard index cards, including three parts:Class name, class responsibilities, class collaborationEach card represents a class.
· Classes represent a collection of objects. These objects are abstract modeling of system design, such as a person or an item. Class names are written at the top of the entire CRC card.
· Its responsibilities include understanding of its own information and how it will be used. For example, a person knows his phone number, address, gender, and other attributes, and he knows his ability to speak and walk. This part is on the left side of the CRC card.
· Collaboration refers to another class. We use this class to obtain the information we want or related operations. This part is on the right side of the CRC card.
The back of the CRC card often records the detailed description of the class and some precautions in the CEC design.
2. How to Use the CRC card to organize team members?
We can use CRC cards to organize design team members, but we need to limit the number of Members to less than 6 to improve efficiency. Otherwise, communication costs may increase. Our members generally consist of the following three types: Responsibilities, number of people suggestions, and descriptions of their features:
· User
O count: 3-5
O features:
§ Rich industry knowledge
§ Clear business process
§ Logical thinking and good communication
§ Interested in system design
· Oo designer
O count: 1-2
O features:
§ Familiar with CRC modeling procedures and methods
§ Familiar with OO design ideas and methods
§ Experience in developing oo Systems
· Project Coordinator
O count: 1
O features:
Good Conference communication and management skills
§ Familiar with CRC modeling procedures and methods
3. CRC analysis process
1) preparations:
Convenes personnel to obtain the statement of work and sow statement of work related to the business process, extract the requirement from sow, and express each specific requirement in the form of a project symbol list.
2) CRC card establishment:
A. The class corresponds to the noun. After reading the demand analysis, you can draw some nouns as the entry point of the class design. Of course, to get used to iteration, the terms listed at the beginning are not necessarily designed as a class, and additional classes may need to be designed in the future due to availability.
B. we can perform one-to-one screening and analysis through this noun list, and properly grasp the relationship between abstraction and specifics. For example, a driver, a secretary, or a manager may be able to abstract people into this category, however, in the first iteration, if there is no obvious requirement, we do not need to consider it for the time being. For general relationships, we can consider the design of superclasses, or we can consider the completion of the constructor overload.
C. In the design, we should note that one of the goals is to ensure scalability, and restructuring is also an implicit requirement we should consider.
D. Through the first iteration, we can find out the classes we need to pay attention. Then we need to clarify the responsibilities of the class. A starting point of responsibility is a verb. The initial list of duties can be obtained from the verb list, and then iteration is performed. In this process, not every verb will become a responsibility. Several Verbs may constitute a responsibility, and some of the responsibilities finally selected may not appear in the initial responsibility, we need a special identifier for shared responsibilities to facilitate special processing in the subsequent detailed design (such as interfaces in Java ).
E. after analyzing the class responsibilities, we began to clarify the collaboration relationships based on these responsibilities and their interactions, at this time, we can use the use case scenario (a transaction or a sequence of Related Operations completed when the system responds to user requests or events) to clarify the objects and messages to be exchanged for each use case. In this process, participants can play roles to activate the atmosphere and reflect responsibilities and collaboration in communication and interaction.
F. After CRC is completed, the formal preliminary design can be completed through UML.