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

Which behavioral design pattern allows an object to alter its behavior when its internal state changes, appearing as if its class changed?

AState Pattern
BStrategy Pattern
CMemento Pattern
DObserver Pattern

Explanation

The State pattern encapsulates state-specific behaviors in distinct classes and delegates calls to the active state object.

Submitted by: mcqstutor Team More Software Engineering MCQs →

No Comments

Leave a comment

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