The abstract factory pattern is a design pattern that allows for the creation of groups of related objects without the requirement of specifying the exact concrete classes that will be used. One of a number of factory classes generates the object sets.
The abstract factory pattern is one of the Gang of Four design patterns which belongs to the creational patterns group. Factories create different types of concrete objects. A Factory now represents a “family” of objects that it can create. This family of objects created by factory is determined at run-time according to the selection of concrete factory class. In this case client doesn’t know which concrete object it gets from each of factories, since it used only the generic interfaces of their products. This pattern is very good when you need to separate the details of objects instantiation. In general factories may have more than one factory method. Each factory method encapsulates the new operator and the concrete, platform-specific, product classes. Each platform is then modeled with a factory derived class.