CRC Cards Structural Design: ZEIT2301 Design of Information Systems

ZEIT2301
Design of Information Systems
Structural Design: CRC Cards
School of Engineering and Information Technology
UNSW@ADFA
Dr Kathryn Merrick
Topic 05: CRC Cards

Overview


To look at ways to construct class and object diagrams
Class-Responsibility-Collaboration Cards
Reference: Text Ch 6.
“Discovering” classes

How do you “discover” the:

classes,
attributes, and

operations

that are relevant for your problem domain?

Four approaches:
1.
2.
3.
4.
Textual analysis
Brainstorming
Pattern review
CRC cards
3
1. Textual Analysis

Perform textual analysis on the Use Case descriptions

Nouns suggest classes

Verbs suggest operations
4
2. Brainstorming

Brainstorm additional candidate classes using common object lists
from a similar business domain.



Look for tangible things (patients, doctors, medical records files, etc)
Look for events that occur in the business domain (appointments,
medical procedures, etc)
Look for interactions (e.g. patient paying a bill). The “bill” could be a
class. But remember that “paying the bill” is a process (typically a
relationship between classes, not a class itself).
5
3. Pattern Review

A pattern is a useful group of collaborating classes that provide a
solution to commonly occurring problems.



e.g. many business transactions involve the same type of objects and
interactions. So re-use rather than re-invent.
Patterns have been developed (and published) for some common
business domains (e.g. accounting)
Some are high-level business patterns, others are low-level
implementation patterns
6
4. CRC cards

Class-Responsibility-Collaboration

CRC cards are used to document the:


responsibilities

collaborations of a class
CRC cards help understand/document the classes to be modelled in
a class diagram

Note: CRC cards are not part of UML
7
Responsibilities & Collaboration


Responsibilities of a class

Knowing: things an instance of a class knows (i.e. the value of its
attributes and its relationships)

Doing: things that instances of a class can do (i.e. execute its
operations)
Collaboration

Most business functions (i.e. use cases) involve several classes
collaborating

An object sends a messages to request a service from
another object eg a Patient object requests the creation of
an Appointment object
8
A CRC Card - Front
9
CRC Card - Back
10
Exercise
Spend a few minutes studying the model
on the next slide.
Look for:
• Attributes
• Operations
• Relations:
• Generalization
• Aggregation
• Association classes
• Note the recursive relationship
• Visibility
• Multiplicities
c
11
Session 2, 2010
Fig 6.2
12