SOLID principle in OOP design

solid
Just to remember the issue.

SOLID is:

SRP -Single responsibility principle
A class should have only a single responsibility.

OCP – Open/closed principle
“Software entities … should be open for extension, but closed for modification”.

LSP – Liskov substitution principle
“Objects in a program should be replaceable with instances of their subtypes without altering the correctness of that program”.

ISP – Interface segregation principle
“Many client-specific interfaces are better than one general-purpose interface.”

DIP – Dependency inversion principle
One should “Depend upon Abstractions. Do not depend upon concretions.”

Source link