Factory Method
Intent
define an interface for creating an object, but leave it up to subclasses to decide which object to create
Applicability
a class can’t anticipate the class of the objects it must create
to connect “parallel” class hierarchies
Structure
Product
ConcreteProduct
Creator
factoryMethod()
ConcreteCreator
Previous slide
Next slide
Back to first slide
View graphic version