Content deleted Content added
Remove unnecessary point about games - see discussion. |
mNo edit summary |
||
Line 1:
The '''Factory Method pattern''' is an [[object-oriented]] [[design pattern (computer science)|design pattern]].
Like other [[creational pattern]]s, it deals with the problem of [[creating]] [[object (computer science)|object]]s (products) without specifying the exact [[class (computer science)|class]] of object that will be created.
Factory Method, one of the patterns from the [[Design Patterns]] book, handles this problem by defining a separate [[method (computer science)|method]] for creating the objects, which [[subclass (computer science)|subclass]]es can then override to specify the [[derived type]] of product that will be created.
More generally, the term ''Factory Method'' is often used to refer to any method whose main purpose is to create objects.
|