Factory is used when the implementation of the class is unknown until run time. You usually have an interface, then multiple classes that implement the interface. Here is a practical example I remember from school.Here is the factory code. Now in you application, you can determine what kind of sort utility you want to use at run time...
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Joined: Mar 13, 2004
Well if I understood you correctly. Factory is used for instance when an instance is created via relfection?