You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a JAVA Program that simulates Traffic and Traffic Lights.
Cars are randomly added to a queue until they are 100.
The Yellow light lasts for 10 seconds, the Green light lasts for 30 seconds and the Red Light lasts for 20 seconds
When when the light is green the cars go , one by one (every second a car gets out )
When the light is yellow , the cars go , one by one (every two seconds one car gets out , because yellow is for caution so the cars are going a little slower )
When the light is red, no car gets to go . They all stay where they are.
The program only ends when all the cars in your collection are gone.