Revised June 29, 2007

AbstractFactory (2.1.1)

A problem for which the Abstract Factory pattern could be useful is discussed in problem 2.1. A partial implementation of this problem is available from package account.

AbstractFactory (2.1.2)

The instructor's program for the above assignment implements the selection of the factory. The code exposes details of the selection. If some details change, the instructor's code must change as well. This is undesirable.

You know a pattern that decouples the instructor's code from these details. Apply this pattern to improve the instructor's program. Identify in your code the pattern essential elements. Identify an important detail that no longer affects the instructor's code.