Beginner level programmers here are some Object Oriented Programming principles to keep in mind,
- Encapsulate what varies
- Code to the interface, not to the implementation
- Favor composition over inheritance
- Strive for loosely coupled designs between objects that interact.
- Classes should be open for extension but closed for modification.
- Depend on abstraction, Do not depend on concrete classes.
- A class should have only one reason to change.
These principles make your code modular, flexible, adaptable and maintainable. Sometimes I missed any points, Let me know!!!
Happy Coding.....
Bookmarks