To identify domain classes and their relationships from a given problem statement using object-oriented analysis.
Domain class identification is a core activity in Object-Oriented Analysis (OOA). A domain class represents a real-world concept in the problem domain.
| Technique | Description |
|---|---|
| Noun Extraction | Identify all nouns in the problem statement as candidate classes |
| Category List | Look for physical objects, roles, events, organizations, containers |
| CRC Cards | Class-Responsibility-Collaboration cards define class behavior |
| Keep | Discard |
|---|---|
| Real-world objects | Vague terms (e.g., "system", "data") |
| Roles (User, Admin) | Implementation concepts (e.g., "database", "array") |
| Events (Order, Booking) | Synonyms / duplicates |
| Containers (Cart, Folder) | Attributes of other classes |
+---------------------------+---------------------------+
| Class Name | Collaborators |
+---------------------------+---------------------------+
| Responsibilities: | - OtherClass1 |
| - What it knows | - OtherClass2 |
| - What it does | |
+---------------------------+---------------------------+
- Read the problem statement carefully and highlight all nouns.
- Remove redundant, vague, or implementation-specific nouns.
- Classify remaining nouns as candidate domain classes.
- For each class, identify its responsibilities (what it knows/does).
- Identify collaborators (which other classes it interacts with).
- Create CRC cards for each domain class.
- Define attributes and operations for each class.
- Draw a simplified domain model showing all classes and relationships.
- Validate domain model against the original problem statement.
Problem Statement: "A hospital management system allows doctors to manage patient records. Patients can book appointments. Nurses assist doctors. Bills are generated after treatment. Each patient is assigned to a ward."
hospital, doctor, patient, records, appointment, nurse, bill, treatment, ward, system
| Class | Reason Kept |
|---|---|
| Patient | Core real-world entity |
| Doctor | Role with behavior |
| Appointment | Key event/transaction |
| Nurse | Role with behavior |
| Bill | Transaction entity |
| Ward | Physical container |
Discarded: "hospital" (too broad), "records" (attribute), "treatment" (activity)
Patient
| Responsibilities | Collaborators |
|---|---|
| Store personal & medical details | Doctor |
| Book / cancel appointments | Appointment |
| View bills | Bill, Ward |
Doctor
| Responsibilities | Collaborators |
|---|---|
| Manage patient records | Patient |
| Conduct appointments | Appointment |
| Prescribe treatment | Nurse, Bill |
Appointment
| Responsibilities | Collaborators |
|---|---|
| Store date, time, status | Patient |
| Confirm / cancel appointment | Doctor |
[Patient] ——books——→ [Appointment] ←——conducts—— [Doctor]
| |
| assigned to assisted by
↓ ↓
[Ward] [Nurse]
[Bill] ←——generated for—— [Patient]