How can the Dependency Inversion Principle be employed to minimize the impact of changes in lower-level modules on high-level modules?

  • It can't be used for this purpose
  • By making high-level modules dependent on low-level modules
  • By minimizing the use of interfaces
  • By inverting the dependencies
The Dependency Inversion Principle (DIP) suggests inverting the traditional dependency relationship, where high-level modules should not depend on low-level modules directly. Instead, both should depend on abstractions (interfaces). This inversion reduces the impact of changes in lower-level modules on high-level modules because high-level modules only depend on abstract interfaces, making them more stable.
Add your answer
Loading...

Leave a comment

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