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.
Loading...
Related Quiz
- The ___________ pattern in OOP allows objects to communicate without knowing each others classes.
- What is the purpose of the "alt" attribute in an HTML image tag?
- What is the time complexity of the bubble sort algorithm?
- Inheritance in OOP allows a class to ___________ properties and behaviors of another class.
- The _________ time is the time taken for the scheduler to switch from one process to another.