Software Engineers Notebook

Software Engineering notes to myself that you may find useful too

View on GitHub
18 September 2018

The Factory Method Pattern

by Martyn Butterworth

Factory method pattern class diagram

The factory method pattern is used when a class needs to instantiate a derivation of another class, but does not know which one. The factory method allows a derived class to make this decision.