April 2018
Intermediate to advanced
246 pages
6h 11m
English
The factory pattern takes the responsibility of creating an object from a client who uses it. It generates the object of classes that are following a common interface. A client has to pass only type of the implementation it wants and the factory will create that object.
If we apply the factory pattern to our balance sheet example, the process of inverting of object creation is depicted as per the following diagram:
