Memento Design Pattern

Memento design pattern provides the ability to store and restore object's internal state without breaking encapsulation. This pattern is useful when we have to support undo or redo operations over an object. In OOPS, every object has internal state. To support undo/redo operations, we must save the state to somewhere. But due to encapsulation, object private/protected properties and methods ar...

Continue Reading