Saved Bookmarks
| 1. |
What Is State Pattern? |
|
Answer» In State pattern a class behavior changes based on its state. This TYPE of DESIGN pattern comes under behavior pattern. In State pattern, we create objects which represent various states and a CONTEXT object WHOSE behavior VARIES as its state object changes. In State pattern a class behavior changes based on its state. This type of design pattern comes under behavior pattern. In State pattern, we create objects which represent various states and a context object whose behavior varies as its state object changes. |
|