Traffic Light Simulation

Logo

Programming Portfolio

View the Project on GitHub zevyirmiyahu/Traffic-Light-Simulation

Traffic Light Simulation

Description:

This mini-project creates and renders two synchronized traffic lights. The progam ensures that no two lights are ever green AND yellow at any one time. The user must define their desired light durations for the first traffic light. The program then creates a second traffic light with a specific schedule and runs both. The program renders the output to the screen for an added visual effect. The mathematical mapping for the second traffic light’s durations is explained below.

Mathematics:

Math

Download the Simulation

To use, download the JAR file: Download JAR File Make sure you have the latest version of Java installed, if not click here to get that first.

Images

Menu Screen

Example Output

Game Play

« Back