Question: Write a program in C++ that controls the stoplights of an intersection. The intersection is at a junction between two 2-lane roads. This light should

Write a program in C++ that controls the stoplights of an intersection. The intersection is at a junction between two 2-lane roads. This light should be symmetric, meaning what is happening at the east light should happen at the west light at the same time. 8 8 8 Requirements: The lights should run on a combination of timers and sensors. If a sensor is activated by a car triggering a "magnet", then the lights should switch after a small delay. The lights should automatically switch after a timer regardless of the sensor. Design it how actual traffic lights work at a four-way intersection. Define all 4 lights with 3 colors each (Red, Yellow, Green), define 2 lights with 4 colors each (Red, Yellow, Green, and Blue [symbolizing a left turn signal]), and define 1 light for a cross walk (Red, and Green). See the diagram. Define one button for cycling all the traffic lights (in a logical way that prevents wrecks) and one for cycling the pedestrian cross-walk light. . . 8 2 1 Write a program in C++ that controls the stoplights of an intersection. The intersection is at a junction between two 2-lane roads. This light should be symmetric, meaning what is happening at the east light should happen at the west light at the same time. 8 8 8 Requirements: The lights should run on a combination of timers and sensors. If a sensor is activated by a car triggering a "magnet", then the lights should switch after a small delay. The lights should automatically switch after a timer regardless of the sensor. Design it how actual traffic lights work at a four-way intersection. Define all 4 lights with 3 colors each (Red, Yellow, Green), define 2 lights with 4 colors each (Red, Yellow, Green, and Blue [symbolizing a left turn signal]), and define 1 light for a cross walk (Red, and Green). See the diagram. Define one button for cycling all the traffic lights (in a logical way that prevents wrecks) and one for cycling the pedestrian cross-walk light. . . 8 2 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
