Question OOP-SOLID-0073
HardWhich pattern changes an object's behaviour when its internal state changes, replacing large if-else blocks on a state field?
- A.
Visitor
- B.
State
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
SOLID and Design Principles question
Which pattern changes an object's behaviour when its internal state changes, replacing large if-else blocks on a state field?
Visitor
State
Sign up free to see the answer and a step-by-step explanation.
Strategy
Template Method