Earlier in this chapter, we identified the abstract factory design pattern as creating an interface to create multiple objects without knowledge of the concrete class. We also stated that the factory method design pattern allows subclasses to determine which class to create. The simple factory design pattern is used to delegate object creation to a specific class.
We will look at an example use case, the UML class diagram, and the source code that's necessary to implement the simple factory design pattern for this scenario.