Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Filing And Computer Database Projects

Authors: Jeffrey Stewart

2nd Edition

007822781X, 9780078227813

Students also viewed these Databases questions

Question

How can you defend against SQL injection attacks?

Answered: 1 week ago