Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started