Dependency inversion

Dependency inversion is a principle of object-oriented programming design that states that high-level modules should not depend on low-level modules. Instead, both should depend on abstractions.

This reduces coupling between modules, making it easier to change one module without affecting others. It also allows for the creation of more flexible and reusable code.