Question: Simulate the visa processing for an embassy. Candidates (threads) can submit visa requests to a waiting queue with a maximum size of 10. The visa
Simulate the visa processing for an embassy. Candidates (threads) can submit visa requests to a waiting queue with a maximum size of 10. The visa request contains the name, age and education level of the candidate. Embassy workers (threads) take requests from the waiting queue and process them. If the education level is > 3 then a visa is created with the details of the candidate and stored in a file called visa_candidateName (one file per visa). If not, then the name of the candidate is added to a file called rejected_candidates (a single file in which all threads save). Each candidate submits a single request.
Implement the required classes and in Main start 100 Candidates. Solve the concurrent access to shared resources using objects lock, wait and notify.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
