Which SOLID principle suggests that a derived class must be substitutable for its base class?

  • Dependency Inversion Principle
  • Liskov Substitution Principle
  • Open/Closed Principle
  • Single Responsibility Principle
The Liskov Substitution Principle (LSP) is the SOLID principle that suggests that a derived class must be substitutable for its base class without affecting the correctness of the program. It ensures that inheritance and polymorphism are used correctly.
Add your answer
Loading...

Leave a comment

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