SOFTWARE ENGINEERING

SOFTWARE DESIGN

DESIGN PATTERNS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
The Dependency Inversion Principle says:
A
Depend upon abstraction. Do not depend upon concrete classes.
B
Don’t call us, we call you.
C
Program to an interface, not an implementation.
D
Favor composition over inheritance.
Explanation: 

Detailed explanation-1: -One should depend upon abstractions, not on the concrete implementation. In a typical system, we have some higher-level, middle-level, and lower-level modules. If the system depends on the concrete implementation, then the higher-level module will depend on the middle-level modules.

Detailed explanation-2: -The dependency inversion principle states that entities should depend on abstractions and not on concretions. That is, a high level module should not depend on a low level module, rather the abstraction. As per the definition found on Wikipedia: “One should depend upon abstractions.

Detailed explanation-3: -The dependency inversion principle states that high-level modules should depend on abstractions rather than low-level modules.

Detailed explanation-4: -The Dependency Inversion Principle (DIP) states that high level modules should not depend on low level modules; both should depend on abstractions. Abstractions should not depend on details.

There is 1 question to complete.