The Dependency Injection pattern describes a solution:
Define a separate Injector object that creates and injects the objects a class requires.
A class accepts the objects it requires from an Injector object
instead of creating the objects directly.
Describing the Dependency Injection design in more detail is the theme of the following sections. See Applicability section for all problems Dependency Injection can solve. [See also MFI]