Depending on the software we are writing, we might have a requirement to be able to restore the state of an object back to its previous state. The purpose of the memento design pattern is to:
Provide the ability to execute an undo action in order to restore an object to a previous state.
The original memento design pattern is implemented with the help of three main objects:
It is important to know that the memento ...