ooad presentatin crc cards
TRANSCRIPT
![Page 1: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/1.jpg)
CRC Card
![Page 2: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/2.jpg)
A brainstorming tool used in the design of object-oriented software.
A collection of standard index cards that have been divided into three sections 1. A class represents a collection of similar objects.2. A responsibility is something that a class knows or does. 3. A collaborator is another class that a class interacts with to fulfill its responsibilities.
The cards are arranged to show the flow of messages among instances of each class.
CRC stands for Class, Responsibilities, Collaborations
What is CRC card ?
![Page 3: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/3.jpg)
Originally proposed by Ward Cunningham and Kent Beck as a teaching tool, but are also popular among expert designers and recommended by extreme programming supporters.
![Page 4: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/4.jpg)
Martin Fowler has described CRC cards as a viable alternative to UML sequence diagram to design the dynamics of object interaction and collaboration.
![Page 5: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/5.jpg)
Create a card for each class
Assign responsibilities and attributes to each card
Identify collaborations between cards
Simulate design scenarios between sets of cards
BASIC IDEAS
![Page 6: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/6.jpg)
Portable: cards can be used anywhere, even away from the computer or office Anthropomorphic: no computer program can capture the essence of the interactions
forced by passing the cards Level of involvement felt by each team member increases Useful throughout the life cycle Provides a basis for more formal analysis and design methodologies Serves as input to a formal method (i.e., a starting point) Ease the transition from process orientation to object orientation - most formal
methods are overwhelming Gives a general bound on the size of a class - a card
ADVANTAGES
![Page 7: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/7.jpg)
![Page 8: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/8.jpg)
![Page 9: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/9.jpg)
Define class role Provide one unique responsibility Identify collaborators (Clients and Services)
Prepare a CRC card for each identified class
![Page 10: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/10.jpg)
EXAMPLE 1
![Page 11: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/11.jpg)
Example…Student CRC card
![Page 12: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/12.jpg)
EXAMPLE 2
![Page 13: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/13.jpg)
EXAMPLE 3
![Page 14: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/14.jpg)
EXAMPLE 4
![Page 15: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/15.jpg)
EXAMPLE 5
![Page 16: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/16.jpg)
EXAMPLE 6
![Page 17: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/17.jpg)
1) Macho Class2) Duplicate Functionality3) Difficulty in Defining Responsibilities 4) No Clear Role is Defined 5) Hard to Map CRC Cards to Class Diagram
Major Problems with Existing CRC Cards
![Page 18: Ooad presentatin crc cards](https://reader034.vdocuments.site/reader034/viewer/2022042508/587ad4141a28ab760f8b73e1/html5/thumbnails/18.jpg)