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