Design Principle: Program to Interfaces, Not Implementations

Design Principle

The “Program to Interfaces, Not Implementations” principle is- Design your code to depend on interfaces, and avoid the dependency on concrete classes. The process is to define interfaces that specify required behavior. Classes then implement the interface and allow the system to extend and modify the implementation, without changing the dependent code.