DIP
-
Dependency Inversion Principle (DIP)Modeling/DesignPattern 2020. 2. 28. 11:16
1. Overview High-level modules should not depend upon low-level modules. Both should depend upon abstractions. Abstractions should not depend upon details. Details should depend upon abstractions. 2. Description 2.1 Dependency public void printMe() { System.out.println("Hello"); } printMe() method depends on out object defined in System Class. public void writeReport() { Report report = new Repo..