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.
- Extend the package account with one or more missing families of products for problem 2.1.
- Design and code an abstract factory for problem 2.1.
- Code a test harness to create users of problem 2.1 using the abstract factory.
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.