Prototype

You work in a company.
You signed a contract of employment.
Your colleagues have done the same thing.
These contracts are very similar.
The employee's name, address and wage change.
Would it not be easier to clone a contract
then just change this information?

THIS IS THE PROTOTYPE DESIGN PATTERN !!!

When you will be in the same situation =
Only some information change between complex objects.

Don't create these objects from scratch, just clone and modify them !!!

Your program will be faster with objects ready to clone.
You can create several prototypes if there are many cases.
If a new constraint has to be added in all your cloned object,
just add it in your prototype.



Links with other design patterns:

You can change store all your prototypes into a static class = flyweight design pattern.