Question: Old MathJax webview Language java Write a class using semaphore (5 marks) (b) A platform has space for at most n people at any one
Old MathJax webview

Language java
Write a class using semaphore

(5 marks) (b) A platform has space for at most n people at any one time. People are only admitted when the number of persons on the platform does not exceed the prescribed limit. Using a semaphore write a class that could be used to control automated access to the platform. Your class must keep a record of the number of people on the platform at any given point in time and must make this value visible through a public method count(). (15 marks) What are Cyclic barriers? Give an example of when you might use this type of barrier (5 marks) (b) A platform has space for at most n people at any one time. People are only admitted when the number of persons on the platform does not exceed the prescribed limit. Using a semaphore write a class that could be used to control automated access to the platform. Your class must keep a record of the number of people on the platform at any given point in time and must make this value visible through a public method count(). (15 marks)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
