Too Long; Didn't Read
Memento Design Pattern has much applicability when it comes to restoring the state of an object. It is a part of the behavioural design pattern which is concerned with algorithms and assignment of responsibilities between objects. The intent of this design pattern is to not violate the encapsulation principle by not exposing information outside the desired objects. In this article we will discuss scenarios where we can use the memento design pattern, talk about its benefits and drawbacks as well as its benefits as well. Let us get started with an example.