This is a simple Traffic and Traffic light generator program that was created using java
The program stimulates traffic and traffic lights. To generate traffic, the cars are generated and they are added to my collection of cars which I implemeted using a queue. and they can only go when the light is green or yellow. That is the car is dequeued from my car. However when the light is red cars will stay in the queue. As the program runs, cars will be generated that is the car is enqueue and added to the queue. The program stops when all the cars in the queue are gone.