Problem Statement
What is the main idea behind the Factory Method pattern?
Explanation
The Factory Method pattern defines an interface for creating an object, but lets subclasses alter which class is instantiated. This allows for loose coupling by delegating object creation to subclasses.
Practice Sets
This question appears in the following practice sets: