Dependancy Inversion Principle
High-Level Modules Should Not Depend on Low-Level Modules. Both Should Depend on Abstractions:
High-level modules (which contain complex logic) and low-level modules (which perform detailed operations) should both depend on abstractions (interfaces or abstract classes).
Abstractions Should Not Depend on Details. Details Should Depend on Abstractions:
The concrete implementation details should depend on abstract layers, not the other way around.
There are five SOLID principles:
Single Responsibility Principle (SRP)
Open Closed Principle (OCP)
Liskov Substitution Principle (LSP)
Interface Segregation Principle (ISP)
Dependency Inversion Principle (DIP)