What is the difference between the State and Strategy patterns?
- None of the above
- The State and Strategy patterns are the same
- The State pattern allows an object to alter its behavior when its internal state changes, while the Strategy pattern allows an object to change its behavior based on the context it is in
- The State pattern allows an object to change its behavior based on the context it is in, while the Strategy pattern allows an object to alter its behavior when its internal state changes
The State pattern allows an object to alter its behavior when its internal state changes, while the Strategy pattern allows an object to change its behavior based on the context it is in
Loading...