What is the SOLID principle in OOP? Explain one of its principles.

  • Dependency Inversion Principle
  • Interface Segregation Principle
  • Open/Closed Principle
  • Single Responsibility Principle
The SOLID principle in Object-Oriented Programming (OOP) is a set of five principles aimed at making software designs more understandable, flexible, and maintainable. The Single Responsibility Principle (SRP) states that a class should have only one reason to change, meaning it should have only one job or responsibility.
Add your answer
Loading...

Leave a comment

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