1
Reply

When to Use a Factory Pattern

Ravi Kumar

Ravi Kumar

Jul 15, 2006
6.8k
0

    • When a class does not know which class of objects it must create.
    • A class specifies its sub-classes to specify which objects to create.
    • Generally, you can use factory pattern where you have to create an object of any one of sub-classes depending on the data provided.

    Moses Soliman
    August 23, 2006
    0