The Dependency Injection design pattern solves problems like:
How can a class be independent
of how the objects it requires are created?
How can the way objects are created
be specified in separate configuration files?
See Applicability section for all problems Dependency Injection can solve.
See Solution section for how Dependency Injection solves the problems.
new ServiceA1(), new ServiceB1())
directly within the class
(Client) that requires (uses) the objects.