Which design principle generally recommends depending on abstractions rather than concrete implementations?

Options

  • A. Dependency Inversion Principle
  • B. Single Responsibility Principle
  • C. Open-Closed Principle
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

A. Dependency Inversion Principle

Detailed Explanation

The Dependency Inversion Principle (DIP) recommends that high-level modules should not depend directly on low-level modules; both should depend on abstractions. This reduces coupling and makes software easier to maintain and modify.