2
answers
1
watching
248
views
8 Apr 2021
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.
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.
21 May 2022
Already have an account? Log in