KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I understand that the State pattern can be used to model objects that changes behavior depending on the state and the various states that the Context can have is encapsulated in concrete classes that represent a State interface . What I am not clear is how the state transitions happen in this pattern . Do the individual states know and decide who follows them or is it the Context that decides which state it will get next ?
Tags (comma-separated)
Save Edits
Cancel