Presentation is loading. Please wait.

Presentation is loading. Please wait.

CRC Cards: Construction Emerson Murphy-Hill Creative Commons Attribution 4.0 License. Material Produced by NCSU Software Engineering Faculty.

Similar presentations


Presentation on theme: "CRC Cards: Construction Emerson Murphy-Hill Creative Commons Attribution 4.0 License. Material Produced by NCSU Software Engineering Faculty."— Presentation transcript:

1 CRC Cards: Construction Emerson Murphy-Hill Creative Commons Attribution 4.0 License. Material Produced by NCSU Software Engineering Faculty.

2 Step 1: Identify and assign candidate classes Read requirements specification. Highlight nouns and noun phrases to give candidate classes (possibly excluding abstract nouns). Write each candidate class down on an index card. Assign each index card to one person who is participating in the CRC card modelling session.

3 Step 2: Determine a set of specific scenarios Develop a comprehensive and specific set of end-to-end scenarios based upon the requirements. A scenario is a sequence of actions that illustrates behavior. Example: Requirement: The alarm clock shall allow a user to set the time. Scenario: The user sets the time for 1:15PM.

4 Step 3: Walk through the scenario, naming cards and responsibilities Walk through the handling of a scenario case pointing to or picking up the cards, naming their responsibilities and how they handle and delegate each request. Add new cards as classes are needed. Note: It’s always good to do very basic/mainstream scenarios first, then explore alternative/complicated scenarios.

5 Clear Intersection Example Car wants to drive through an intersection. The car can only drive through the intersection if the traffic light is green and there are no cars in the intersection. Otherwise, the car needs to join a queue.

6 Step 1: Identify and assign candidate classes Car wants to drive through an intersection. The car can only drive through the intersection if the traffic light is green and there are no cars in the intersection. Otherwise, the car needs to join a queue. Car Traffic light Queue Intersection

7 Step 2: Determine a set of specific scenarios Car approaches the intersection and the light is green and there are no cars in the way. Car approaches the intersection and the light is red. Car is in the queue and the light turns green.

8 Step 3: Walk through the scenario, naming cards and responsibilities Index Card: Car Responsibility Drive Join Collaborator Traffic light Queue Intersection Car Car approaches the intersection and the light is green and there are no cars in the way. Car approaches the intersection and the light is red. Car is in the queue and the light turns green.


Download ppt "CRC Cards: Construction Emerson Murphy-Hill Creative Commons Attribution 4.0 License. Material Produced by NCSU Software Engineering Faculty."

Similar presentations


Ads by Google