December 2017
Intermediate to advanced
468 pages
13h 12m
English
This pattern suggests to let the subclasses instantiate the needed classes. The factory method defines an interface, but the instantiation is done by subclasses:

The preceding structure depicts a factory method, and an application uses a factory to create subtypes with an interface.
The benefits of using this are as listed:
The impact of using this is that it creates parallel class hierarchies (mirroring each other's structures), ...
Read now
Unlock full access