Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Creating objects is a messy business. So many object-oriented designs deal with nice, clean abstract classes, taking advantage of the impressive flexibility afforded by polymorphism (the switching of concrete implementations at runtime). To achieve this flexibility though, we must devise strategies for object generation. This is the topic we will look at here.
This chapter will cover
clone to generate objects