(Solved): Design a UML Statechart for the following system: The system consists of: - One set of traffic-ligh ...
Design a UML Statechart for the following system: The system consists of: - One set of traffic-lights (traffic-red, traffic-amber, traffic-green) - One set of pedestrian-lights (pedestrian-red, pedestrianamber, pedestrian-green) - One pedestrian push-button. If the pedestrian push-button is not pressed the traffic lights cycle through their normal sequence of red \( \rightarrow \) amber->green->red. The timing of the traffic lights is as follows: - Traffic-red light on for 10 seconds - Traffic-amber light on for 5 seconds - Traffic-green light on for 40 seconds - The pedestrian-red light remains illuminated at all times. If the pedestrian push-button has been pressed the sequence of the traffic lights is altered such that the traffic-red light remains illuminated for 30 seconds allowing the pedestrian lights to follow the following sequence: - Pedestrian-red on for 2 seconds - Pedestrian-orange on for 3 seconds - Pedestrian-green on for 20 seconds - Pedestrian-orange flashing at \( 1 \mathrm{~Hz} \) for 3 seconds - Pedestrian-red on for 2 seconds - The traffic-red light remains illuminated at all times. The system should return to the normal sequence once the pedestrian 30 second cycle has completed.