Memento Design Pattern
The memento design pattern is a simple pattern to save and restore an objects state while preserving encapsulation. In simple terms this means you could implement “undo” functionality just like you’d find in a text editor or many other programs. UML Diagram There are three classes involved in the Memento Design Pattern. These are the Originator, Memento and CareTaker classes. Of course there is also the fourth part not shown in the diagram; your app. The Originator Class The Originator…