What is SOLID design principle?

SOLID word in SOLID design principle is an acronym for:

  • S: Single responsibility. A Class should have a single responsibility.
  • O: Open-closed. Software entities should be open for extension but closed for modification.
  • L: Liskov substitution. Objects in a program should be replaceable by subclasses of same type without any adverse impact.
  • I: Interface segregation. Multiple client specific interfaces are preferable over single generic interface.
  • D: Dependency inversion. Program should depend on abstract entities. It should not depend on concrete implementation of an interface.

This principle was mentioned by Robert C. Martin. These are considered five basic principles of Object Oriented design.

If we follow these principles, then we can create a stable program that is easy to maintain and can be extended over time.

Read the full book at www.amazon.com
Posted in Design Pattern, Design Pattern Interview Questions

Leave a Reply

Your email address will not be published. Required fields are marked *

*