![]() ![]() Step wise Implementation of above Example: It doesn’t modify the Memento but can save and restore the state of the Originator. Caretaker: This is responsible for holding and managing Memento objects.It has two primary interfaces, getState() returns the saved stateand setState(state) sets the state to a specific value. Memento: This is an object that stores the state of the Originator.The Originator creates a Memento object to save its state and uses it to restore its state. Originator: This is the object whose state we want to capture.The Memento pattern aims to capture an object’s internal state, so it can be restored to that state later. ISRO CS Syllabus for Scientist/Engineer Exam.ISRO CS Original Papers and Official Keys.GATE CS Original Papers and Official Keys.Top 10 System Design Interview Questions and Answers.Top 20 Puzzles Commonly Asked During SDE Interviews. ![]() Top 100 DSA Interview Questions Topic-wise.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |