SOLID Principle in OOPS Programming
The SOLID principles are useful to build a neat an good software. These are the programming and design principles of programming.
SOLID===>
The SOLID principles are useful to build a neat an good software. These are the programming and design principles of programming.
SOLID===>
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion principle
1. Single Responsibility Principle(SRP):
Each and Every Class should have a single responsibility. The Class should be changed for one and only reason.
2. Open-Closed Principle(OCP):
A Class should be Open for extension and close for modification.
3.Liskov Substitution Principle(LSP):
Objects of parent class can be replaced by objects of child class, without altering the properties of the program.
4. Interface Segregation Principle(ISP):
Program should generate client specific interfaces rather than general purpose interfaces.
5. Dependency Inversion principle(DIP):
A Class should depend on Abstractions rather than Concretions.
No comments:
Post a Comment