Factory Method Design Pattern
The informal description: Excerpts from [Gamma et al. 1995] (adapted for this purpose):
Intent: Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Structure: Original OMT diagram converted to UML (Why and How?):
Collaborations: Creator relies on its subclasses to define the factory method so that it returns an instance of the appropriate ConcreteProduct.
|Factory Method in LePUS3 (legend)|
|Factory Method in Class-Z (legend)|