There are four key elements of OOD. They are as follows:
- Abstraction: Hiding the complexity and low-level implementation details of internals.
For instance, you see electrical switch buttons that can toggle on and off, but how it is achieving on and off is not shown to outside world, and in fact, it is not necessary for the common users. - Encapsulation: Bundling of the data with the methods that operate on that data, preventing accidental or unauthorized access to the data.
For example, switching off function should turn only the targeted element off, say a reading lamp, and it should not affect any other electrical functions that are part of the same electrical system. - Modularization: The process of decomposing and making it as modules to reduce the complexity of the overall program/function.
For example, switch off and on is a common functionality of an electrical...