Skip to content

Kundai10/Traffic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traffic

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages