Define an interface for creating an object, but let subclasses decide which class to instantiate.
The Factory method lets a class defer instantiation it uses to subclasses.
Example
The Product:
The Concrete Product:
The Factory:
A simple class to test the Factory Method design pattern: