Single Responsibility Principle (Example)
Single Responsibility Principle states that a class should have a single responsibility but not more than that. Simple a class should have one reason to change.
Open Closed Principle (Example)
Objects or entities should be open for extension but closed for modification.
Liskov Substitution Principle (Example)
Derived classes must be substitutable for their base classes.Simply says that codes that work with parent classes or interfaces should not break when those classes are replaced with the child classes or interface- implementing classes.
Interface Segregation Principle (Example)
A client should never be forced to implement an interface that does not use or a client should not forced to depend on methods that they do not use.
Dependency Inversion Principle (Example)
Higher level modules should not depend on lower level ones.Both should depend on abstraction.