HI I got this coursework question to solve.
This is the question:
Design a program 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 time of vehicles randomly in each direction and set up a regular frequency of the light changes. Run your direction and set up a regular frequency of the light changes. Run your simulation for a set period of time to view the "behaviour" of the intersection.
Coursework Requirement:
- Should be coded in java
- Use of proper data structures
If any one has any clue of how to do it, please help; I have no idea.