GoF Definition: Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
The prototype pattern provides an alternative method for instantiating new objects by copying or cloning an instance of an existing one. Creating a new instance, in a real-world scenario, is normally treated as an expensive operation. This pattern helps us to deal with this issue. Our focus here is to reduce the expense of this creational process of a new instance.
Suppose we have a master copy of a valuable document. We want to make some change to it to ...