I had a problem and tried to use Java. Now I have a ProblemFactory.
—Old Java joke
This chapter covers two GoF patterns: Factory Method and Abstract Factory. These patterns are closely related, so we’ll discuss them together. The truth, though, is that the real design pattern is called Factory and that both Factory Method and Abstract Factory are simply variations that are important, but certainly not as important as the main thing.