Repaso
EspaƱol
Design & PracticesFoundationsDP-62

What is SOLID?

Options

  1. Five OO design principles: SRP, OCP, LSP, ISP and DIP (Correct option)
  2. A cloud storage product for large files
  3. A type of database that stores solid objects
  4. Five Agile ceremonies held during a sprint

Answer

Five object-oriented design principles: Single responsibility, Open-closed, Liskov substitution, Interface segregation, Dependency inversion

Why

SOLID is a set of five guidelines to keep object-oriented code easy to change. They were introduced by Robert C. Martin, and the acronym was coined later by Michael Feathers.

  • S: a class should have one reason to change.
  • O: extend behavior without modifying existing code.
  • L: a subclass must be usable wherever its parent is expected.
  • I: prefer small, focused interfaces.
  • D: depend on abstractions, not concrete classes.

Remember

SOLID = five design principles (SRP, OCP, LSP, ISP, DIP).

Key terms

Practice this question in Repaso