Object Technology refers to a way of designing and developing software using objects, which represent real-world entities. These objects contain data (attributes) and behavior (methods/functions).
👉 In simple words: Instead of writing long procedures, we break a system into smaller objects that interact with each other.
These principles are the foundation of Object-Oriented Analysis and Design (OOAD).
Definition: Abstraction means showing only essential features of an object and hiding unnecessary details.
Key Idea: Focus on what an object does, not how it does it.
Example: A Car object:
Diagram Description:
A simple box labeled Car with only relevant features like start(), stop().
Definition: Encapsulation is the process of wrapping data and methods together into a single unit (class) and restricting direct access to some components.
Key Idea: Protect data from outside interference.
Example:
BankAccount
- balance (private)
+ deposit()
+ withdraw()
Users cannot directly change balance, only through methods.
Rule: Use access modifiers:
Definition: Inheritance allows one class (child/subclass) to acquire properties and behavior of another class (parent/superclass).
Key Idea: Code reuse and hierarchical classification.
Example:
Vehicle (Parent)
→ Car (Child)
→ Bike (Child)
Types of Inheritance:
Diagram Description: Tree structure showing parent → child relationship.
Definition: Polymorphism means one interface, multiple implementations.
Types:
Example:
draw()
- draw(circle)
- draw(square)
Real-life Example: A person can be a teacher, father, or friend depending on context.
Definition: Breaking a system into smaller independent modules.
Key Idea: Each module handles a specific task.
Advantages:
Definition: Arrangement of objects/classes in a tree-like structure.
Example:
Animal
├── Mammal
├── Bird
Definition: Typing ensures that objects are used according to their defined data types and class structure.
Types:
Definition: Ability of a system to handle multiple tasks simultaneously.
Example: Using multiple threads in a program.
Definition: Objects continue to exist even after program execution.
Example: Saving data in a database or file.
| Class | Object |
|---|---|
| Blueprint | Instance |
| Logical | Physical |
| Example: Car design | Actual car |
Definition: Objects communicate by sending messages (calling methods).
Example:
object1.method(object2)
| Concept | Description |
|---|---|
| Association | General relationship |
| Aggregation | Weak "has-a" relationship |
| Composition | Strong ownership |
Example:
👉 Problem: Design a Library System
Step 1: Identify objects
Step 2: Define attributes
Step 3: Define methods
Step 4: Establish relationships
👉 Remember: "A PIE MHTCP" Trick (A → Abstraction, P → Polymorphism, I → Inheritance, E → Encapsulation, M → Modularity, H → Hierarchy, T → Typing, C → Concurrency, P → Persistence)
Open this section to load past papers