Factory Method#

UML#

Factory method class diagram

Uses#

  • When it’s not know which subclass to work with.

  • Reusing existing object/s instead of creating a new one each time.