GoF Statement of 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. |
Brief Overview:![]() |
One of the creational patterns. This pattern focuses on the creation of
objects without specifying the exact class of the object to be created.
Like other creational patterns this is done by defining a separate function
to handle creating objects. Subclasses then override this method to instantiate
the appropriate object. |
UML Diagram: |
![]() |