Pakistan's best MCQs practice hub — FPSC · PPSC · CSS · NTS · Other Exams
Login

Which behavioral pattern provides a way to capture and restore an object’s internal state without violating encapsulation (enabling Undo mechanisms)?

APrototype Pattern
BCommand Pattern
CMemento Pattern
DVisitor Pattern

Explanation

The Memento pattern captures an object’s internal state so it can be restored later without exposing its private fields.

Submitted by: mcqstutor Team More Software Engineering MCQs →

No Comments

Leave a comment

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