|
PaymentService(CreditCardProcessor()) // high level class CreditCardProcessor depends on low level class PaymentService which violates DIP. |
Isn't PaymentService the high level class that depends on CreditCardProcessor as the low level class? Can you please explain how the dependency is working here?
SOLID_Principles_Kotlin/src/main/kotlin/d/DependencyInversionPrincipleViolation.kt
Line 66 in 5040efc
Isn't
PaymentServicethe high level class that depends onCreditCardProcessoras the low level class? Can you please explain how the dependency is working here?