Mohan pd.
Mohan pd. Author of The Coders Blog. Also a professional fullstack javascript developer working with various tech company and client around world.

Principles of Object Oriented Programming

Mar 04, 2019 · 1 min
Principles of Object Oriented Programming

Here are the quick short notes to remember object oriented programming.

  1. Encapsulate what vares.

  2. Code to the interface, not to the implementation

  3. Favour composition over inheritance

  4. Strive for loosely coupled designs between objects that interact.

  5. Classes should be open for extension but closed for modifications.

  6. Depend on abstractions. Do not depend on concrete classes.

  7. A class should have only one reason to change.