User:Szucsatti/Abstract Factory

The Abstract Factory is a creational pattern and is used when different set of objects need to be created, but they are related in a way they can all have a common superclass. Then an abstract factory class is created that will be used to create a certain set of objects. This class will have abstract methods for creating each object. In the code, every object will be created using an instance of this class. These methods will be overridden in the classes that extend this superclass.

Each time the developer needs to create another set of objects he just instantiates another factory class, and the whole object creation will change.