Explain the following question in detail how to solve using java programming with detailed code and output screenshot In a city outer, there is a tunnel of 1 km length. Due to tunnel condition, only...


Explain the following question in detail how to solve using java programming with detailed code and output screenshot


In a city outer, there is a tunnel of 1 km length. Due to tunnel condition, only one way travel is possible and the traffic signal usually on minute basis, every five minutes it changes allowing people from city to travel outside and people to enter the city. During weekends, more people travel from "city to outer" compared to "outer to city". Instead of minute basis, create two threads which counts the number of cars on each side, whichever thread gets the count 10, then it will be given chance to turn the signal on. Define a class and use necessary methods for the given scenario.


Note:today is my deadline please answer as fast as you can



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here