Sunday, April 10, 2005 03:10 AM
A factory is not a class, but a design pattern. (google...
). A Factory pattern is a way to create objects without the client knowing how it is done.
Car honda = CarFactory.createComplexCar("Honda");
Car mercedes = CarFactory.createComplexCar("Mercedes");
Now you have two car-objects, without knowing how it's done, which saves a lot of time, and hides the complexity.