The abstract factory design pattern solves the following problem:
- Your application code needs to create instances of type X.
- Type X is an interface (or an abstract class), and might have different concrete implementations.
- Your application code should not depend on any specific implementation.
As usual, we will develop our solution one step at a time.
Let's start from step 1.