UML State Chart Diagram
UML State charts are not normally needed. They are needed when an object has a different reaction dependent on its state. The state design pattern uses polymorphism to define behavior.
The state pattern passes a reference to the state it wants to set. It normally will use the singleton pattern to pass this reference meaning the references to the states will be global. There will be a collaboration diagram for messages passed to each state.
No comments:
Post a Comment