Welcome to my Memento Design Pattern Tutorial! The Memento design pattern provides a way to store previous states of an Object easily.
It has 3 main classes. Memento: The basic object that is stored in different states. Originator: Sets and Gets values from the currently targeted Memento. Creates new Mementos and assigns current values to them. Caretaker: Holds an ArrayList that contains all previous versions of the Memento. It can store and retrieve stored Mementos. All of the code is down below to help you learn.