Key elements of OOD

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 system. Switching a reading lamp on and off may be a separate module and decoupled from other complex functions such as switching off washing machine and AC.
  • Hierarchy: It is ordering of abstraction and hierarchy of an interrelated system with other subsystems. Those subsystems might own other subsystems as well, so hierarchy helps reach the smallest possible level of components in a given system.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset