Professional Documents
Culture Documents
CHAPTER IN BOOK- 7
DAY- 15
-K. Indhu
SYLLABUS COVERED HERE
• Classification
• Common Class Patterns Approach
• Use Case Driven Approach
• CRC Approach
31-JAN-14 K. INDHU 2
GOALS
• Common Class Patterns Approach
1. Concepts
2. Events
3. Organization, 4. Places
5. People
6. Tangible Things and Devices
• Use Case Driven Approach
• CRC Approach
• General Guidelines for naming Classes
5-FEB-14 K. INDHU 3
COMMON CLASS PATTERNS APPROACH
• This approach is based on the knowledge-base of the common
classes that have been proposed by various researchers.
• They have compiled and listed the following patterns for finding
the candidate class and object:-
5-FEB-14 K. INDHU 4
CANDIDATE CLASSES - CONCEPTS
• A Concept is a particular idea or understanding
that we have of our world.
5-FEB-14 K. INDHU 5
CANDIDATE CLASSES - EVENTS
• Events classes are points in time that must be
recorded and remembered.
5-FEB-14 K. INDHU 6
CANDIDATE CLASSES - ORGANIZATION
• An organization class is a collection of people,
resources, facilities or groups to which the users belong.
5-FEB-14 K. INDHU 8
CANDIDATE CLASSES –
TANGIBLE THINGS & DEVICES
•For example-
1. Cars,
2. Pressure-Sensors
•are all examples of Devices class.
5-FEB-14 K. INDHU 9
COMMON CLASS PATTERNS APPROACH
- ATM
1. Events->
1. Account Class
2. Checking Account Class
3. Savings Account Class
2. Organization->
1. Bank Class
3. People->
1. Bank Client Class
4. Place->
1. N/A
5. Tangible Things & Devices->
1. ATMMachine Class
05-FEB-14 K. INDHU 10
USE CASE DRIVEN APPROACH
• Modeling with use cases is a recommended aid in finding the objects of
a system.
• This is the technique used by the unified approach.
1. Once the system has been described in terms of its scenarios, we can
examine the textual description or steps of each scenario to determine
what objects are needed for the scenario to occur.
3. By walking through the steps, you can determine what objects are
necessary for the steps to take place.
05-FEB-14 K. INDHU 11
USE CASE DIAGRAM- ATM- I
05-FEB-14 K. INDHU 12
USE CASE DIAGRAM- ATM- II
05-FEB-14 K. INDHU 13
SEQUENCE DIAGRAM- ATM (SHORT)
05-FEB-14 K. INDHU 14
SEQUENCE DIAGRAM- ATM (DETAILED)
05-FEB-14 K. INDHU 15
COLLABORATION DIAGRAM- ATM
05-FEB-14 K. INDHU 16
CRC CARDS APPROACH
1. CRC stands for Class, Responsibilities and
Collaborators, developed by Cunningham, Wilkerson
and Beck.
05-FEB-14 K. INDHU 17
COLLABORATIONS
• An object can accomplish either a certain
responsibility itself, or it may require the
assistance of other objects.
• If it requires an assistance of other objects, it
must collaborate with those objects to fulfill its
responsibility.
05-FEB-14 K. INDHU 18
CRC CARDS APPROACH
• CRC cards are 4" x 6" index cards.
• All the information for an object is written on a card.
• CRC starts with only one or two obvious cards.
• If the situation calls for a responsibility not already covered by
one of the objects:-
– Add, or
– Create a new object to address that responsibility.
05-FEB-14 K. INDHU 19
GENERAL GUIDELINES
- FOR NAMING CLASSES
05-FEB-14 K. INDHU 20
HAPPY LEARNING!!!