Question: Create a system to simulate vehicles at an intersection. Assume that there is one lane going in each of four directions, with stoplights facing each

"Create a system to simulate vehicles at an intersection. Assume that there is one lane going in each of four directions, with stoplights facing each direction. Vary the arrival average of vehicles in each direction and the frequency of the light changes to view the "behavior" of the intersection."

You canNOT use the Java collection API. You canNOT use the Java built-in Queue or Deque class. Use an Array or Linked List implementation of a queue as explained in the text. This means a jsjf package containing QueueADT.java file with CircularArrayQueue.java or LinkedQueue.java and LinearNode.java.

Include user-defined exceptions and javadoc comments.

Be sure to test thoroughly, and document your results.

Be sure to label your outputs so that when I run your code I can readily understand what you're doing.

Determine what is the optimal light-change time to maximize car throughput.

You can assume it takes one second for one car to cross an intersection. There are no yellow lights and no left or right turns.

Here is a typical program output log:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!