Pillars of Object Orientation
Degree to which system is capable of being assembled and disassembled with multiple parts at reasonable cost
- Laptop is more modular than cup as harddrive can be replaced which handle of cup is not replaceable.
- Modular software has many components which are independent and replaceable.
It is act of finding common essential properties among set of objects and also, differentiating that set from other sets.
- Classifcation of anything e.g. taxonomy in biology
- Defining classes or common set of objects in OO languages
Limiting access to private implementation only by public interface
- In a restaurant, customer has limited access to kitchen via waiter.
- In OO language, data members in class are kept private with public getters/setters as per context
Limiting access to multiple different private implementations by single public interface
- If you learn to drive one car, you learn to drive almost all other cars.
- In OO language, same interface is implemented by multiple classes.
Reverse tree like stucture
- Inheritance tree of classes in OO language
- 'Part of' relationship among parts of composite object