Brief Statement of SOLID Principles

Brief Statement of SOLID Principles

Image Source

S – Single Responsibility Principle

A class or module should have one and only one reason to change.

O – Open Closed Principle

Software entities (classes, modules, functions etc.) should be open for extension but closed for modification.

L – Liskov Substitution Principle

Functions that use references of base classes must be able to use objects of the derived class without knowing it.

I – Interface Segregation Principle

Clients should not be forced to depend on methods they do not use.

D – Dependency Inversion Principle

=> High-level modules should not depend on low-level modules. Both should depend on abstractions.

=> Abstractions should not depend on details, details should depend on abstractions.