SOLID is an acronym for the first five object-oriented design (OOD) principles by Robert C. Martin


SOLID stands for:

  • S - Single-responsibility Principle
  • O - Open-closed Principle
  • L - Liskov Substitution Principle
  • I - Interface Segregation Principle
  • D - Dependency Inversion Principle


Single-responsibility Principle (SRP) states:

A class should have one and only one reason to change, meaning that a class should have only one job.



References

  • No labels