2
answers
1
watching
248
views

Explain the following question 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.

For unlimited access to Homework Help, a Homework+ subscription is required.

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Already have an account? Log in

Weekly leaderboard

Start filling in the gaps now
Log in