What is the purpose of the Memento pattern?

  • To create complex objects step by step, using a builder object to abstract the process of creating the object
  • To provide a common interface for a group of related classes
  • To provide a mechanism for saving and restoring an object's internal state without violating encapsulation
  • To provide a simplified interface to a complex system, hiding the complexity of the system behind a single interface
The Memento pattern provides a mechanism for saving and restoring an object's internal state without violating encapsulation
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *