I'm new to Design Patterns and am trying to learn how they typically look like. Right now I'm trying to understand the Factory Pattern, and I were wondering if my example is a typical Factory Pattern structure:
The ShapeFactory class uses the Shape-classes as dependencies(and are not instantiating them). Must the ShapeFactory instantiate the Shape-classes to be called a factory? Is this an accurate Factory Pattern diagram, or should the relation between the Shape-classes be associations instead?
Aucun commentaire:
Enregistrer un commentaire