
A Class Model is a static representation of a system that shows:
A Class Model is a static representation of a system that shows:
👉 Simple idea: It describes the structure of the system (what it is made of), not how it behaves.
A class is a blueprint for creating objects.
Example:
Class: Student
- name
- rollNo
+ study()
+ attendClass()
Represented as a rectangle divided into 3 parts:
-----------------
| Class Name |
-----------------
| Attributes |
-----------------
| Methods |
-----------------
Example:
Example:
Definition: A general relationship between two classes.
Example:
Teacher —— Student
👉 A teacher teaches students
Shows how many objects are involved.
| Notation | Meaning |
|---|---|
| 1 | One |
| 0..1 | Zero or one |
| 1..* | One or many |
| * | Many |
Definition: A weak “has-a” relationship (part can exist independently).
Example:
Classroom ◇—— Student
👉 Students can exist without classroom
Definition: A strong “has-a” relationship (part cannot exist independently).
Example:
House ◆—— Room
👉 Room cannot exist without house
Definition: One class inherits from another.
Example:
Vehicle
↑
Car
Definition: One class depends on another temporarily.
Book
- title
- author
+ issue()
Member
- name
+ borrow()
Relationship:
Member —— borrows —— Book
Class Model = Structure of system
Shows:
👉 Trick: "CAAMID" (C → Class, A → Attributes, A → Association, M → Methods, I → Inheritance, D → Dependency)
Open this section to view and download past papers
Click on Show Past Papers to load available exam papers.