Factory Method/Abstract Factory

A Factory method pattern (aka Factory pattern) is a creational pattern. The creational patterns abstract the
object instantiation process by hiding how the objects are created and make the system independent of the object
creation process. An Abstract factory pattern is one level of abstraction higher than a factory method pattern,
which means it returns the factory classes.
 
Factory pattern returns one of the several product subclasses. You should use a factory pattern If you have a super class and a number of subclasses,and based on some data provided, you have to return the object of one of the subclasses.
An Abstract factory pattern is one level of abstraction higher than a factory method pattern, which means the abstract factory returns the appropriate factory classes, which will later on return one of the product subclasses.