The Abstract Factory design pattern provides a solution:
Encapsulate creating a family of objects in a separate factory object.
A class delegates object creation to a factory object
instead of instantiating concrete classes directly.
Describing the Abstract Factory design in more detail is the theme of the following sections.
See Applicability section for all problems Abstract Factory can solve.

Background Information