Chapter overview

In this chapter, you will be focusing on a common interface to create new objects without the need to call constructors directly. First, we will look at reasons why a switch statement can be harmful. Next we will look at a design principle that leads us to our final solution, a factory. Then we will look at few different ways to design our factories to make them flexible and reusable.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.224.226