Question: Problem Design a traffic light system for a College Station street intersection involving a North- South (N-S) road and an East-West (E-W) road as shown
Problem Design a traffic light system for a College Station street intersection involving a North- South (N-S) road and an East-West (E-W) road as shown in Figure 1. The traffic light system shall have left-turn light signals for all the four turning directions, which shall be activated only when a sensor detects a car in a left-turn lane. N-S Road E-W Road ZZZ X ! 111 Xsensor Figure 1. A North-South (N-S) road and East-West (E-W) rond intersection. Normally, the N-S road through traffic light shall be green and the E-W road light shall be red. After a normal-time interval (NTI, nominally 25 seconds) the N-S road traffic light shall become yellow, and after a short-time interval (STI, nominally 5 seconds) shall change to red, The E-W road traffic light shall be green when the N-S road light is red. After a normal-time interval (NTI) the E-W road traffic light shall become yellow, and after a short-time interval (STI) shall then change to red. When a sensor signals that a vehicle is on a left-tumn lane for the N-S road, the N-Straffic light system shall operate as follows: The N-S road left-turn traffic light for each direction shall be green and the traffic light for through traffic shall be red, while the E-W road light shall be red. After a short-time turn interval (STTI, nominally 10 seconds) the N-S road left-turn traffic light shall become yellow, and after a short-time interval (STI) shall change to red. Then the N-S read through traffic light shall be green and the E-W road light shall remain red. After a normal-time interval (NTI) the N-S road traffic light shall become yellow, and after a short-time interval (STI) shall then change to red. When a sensor signals that a vehicle is on a left-turn lane for the E-W road, the E-W traffic light system shall operate as follows: The E-W road left-turn traffic light for each direction shall be green and the traffic light for through traffic shall be red, while the N-S road light shall be red. After a short-time turn interval (STTI) the E-W road left-turn traffic light shall become yellow, and after a short-time interval (STI) shall change to red. Then the E-W road through traffic light shall be green and the N-S road light shall remain red. After a normal-time interval (NTI) the N-S road traffic light shall become yellow, and after a short-time interval (STI) shall change to red. A timer that produces output signals after normal time intervals and short time intervals will be available. It can be restarted at anytime. (a) What are the control inputs of this traffic light system? Assume that a control input, INITIALIZE, which puts the system in some initial state, is available. (b) What are the control outputs of the traffic-light system? Assume a control output, RESTART, is available to reset and restart the timer. (c) List the states of the traffic light system and draw the state transition diagram for the system (d) Define a discrete system Z = (SZ, IZ, OZ, NZ, RZ) for the traffic light system. You may use abbreviations for your state, input, and output names. (e) Assume that the traffic light system is going to have a controller, to control all the activities of the system. Using object-oriented analysis, identify the objects in the system and draw an N2 chart that shows the relationships/interactions between the objects. (f) Use information in the N2 chart from part (e) and the problem statement to create one of each of the following UML documents: use-case diagram, sequence diagram for a sensor detecting a vehicle and reporting to the controller, and in turn the controller controlling the lights, and class diagram