Enter your E-mail Address below for Free E-mail Alerts right Into your Inbox: -

Sunday

SOLID Principle in OOPS

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===>

  1. Single Responsibility Principle
  2. Open-Closed Principle
  3. Liskov Substitution Principle
  4. Interface Segregation Principle
  5. 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