Added the code for Prototype pattern