Middle
What is SOLID? List the principles.
sobes.tech AI
Answer from AI
SOLID is a set of five principles of object-oriented programming aimed at creating flexible, extendable, and maintainable code:
- S (Single Responsibility Principle) — the principle that a class should have only one reason to change.
- O (Open/Closed Principle) — the principle that software entities should be open for extension but closed for modification.
- L (Liskov Substitution Principle) — the principle that objects of a subclass should be interchangeable with objects of the superclass.
- I (Interface Segregation Principle) — the principle that clients should not depend on interfaces they do not use.
- D (Dependency Inversion Principle) — the principle that dependencies should be based on abstractions, not on concrete implementations.