$24
Introduction
This individual homework requires the student to modify homework 1 design and implementation to apply the state pattern. In homework 1, a variable had been used to keep track of the state of the controller, and respond to the GUI events according to the state. This approach results in high complexity, especially when there are many states and many triggering events. This homework requires the student to apply the state pattern to reduce the complexity.
What Needs to be Done and Submit?
This homework requires the student to do the following:
Produce a state machine to describe the state-dependent behavior of the controller.
Apply the state pattern to produce a design for above state-dependent behavior. That is, apply the state pattern to convert the state machine into a UML class diagram.
Modify homework 1 design class diagram to include the state pattern design produced above. Use UML stereotype or UML note to show the state pattern.
Modify homework 1 design sequence diagram (DSD) to include application of the state pattern. Use UML stereotype or UML note to show the state pattern.
Modify homework 1 Java code to apply the state pattern. Provide in-code comments to show the state pattern.
Compile, run and test your software. Produce and submit screen shots to show the working of your software.
How To Submit
To be announced by the TA before the deadline.
1