Closed

flying to wonderland

Passengers of Flight CS-344715 to Purell-Wonderland, NY arrive at the airport 3 hours before departure (use sleep(random_time) to simulate arrival). Upon their arrival, they go straight to the check-in kiosk to print their boarding passes.

Unfortunately, due to budget cuts, the airline can only maintain two checking counters at this time. To avoid crowding around the highly sought-after checking counters, the airline asks passengers to form lines of no more than a few passengers at each counter (determined by counterNum) Each passenger must block on a different object. Use a similar approach as the one in rwcv.java. Those not able to get on a line for a counter are asked to stand by (wait). To ensure fairness to those that arrived early, passengers should be helped in the order in which they arrived (ensure FCFS among passengers).

At each checking counter, there is a checking counter-clerk who will assist the passengers. While assisted, the passengers receive their boarding pass with their seat and zone number printed on it. Note that the aircraft holds only 30 passengers and is split up in 3 zones. Passengers are assigned a random seat number between 1-30 and a corresponding zone number; passengers with seat numbers between 1 and 10 passengers are in Zone 1, passengers with seat numbers between 11 and 20 are in Zone 2, etc. The number is generated by the clerk and assigned to the passenger. (Output a message to the screen with the passenger’s seat and zone information).

Once the passenger arrives at the gate, they take a seat and wait for the flight attendant to call for passengers to board (passengers belonging to the same zone will all block on the same object. So there will be 3 different objects for 3 different zones)

A half an hour before the plane departs, the flight attendant begins to call passengers up to the door of the jet bridge. The flight attendant calls the zones one by one.

For example, when it comes to zone 1, the flight attendant calls all passengers of zone 1 (use notifyAll) and asks the passengers to scan their boarding pass and get to the airplane’s door. This must be done in a mutual exclusion way. Use synchronized methods. When all have arrived, the passengers enter the plane in groups (determined by groupNum), so that passengers can comfortably stow their belongings and take their seats. You don’t necessarily need to use separate notifications objects, rather use a variable that will be updated. When that variable becomes groupNum, allow first the passengers part of that group to arrange their luggage and take a seat, and next a new groupNum of passengers will be able to get inside the plane.

The flight attendant calls each of the remaining zones the same way.

After all zones have boarded, the flight attendant makes an announcement indicating that the door of the plane has closed. All passengers that arrive at the gate after this announcement are asked to rebook their flight and return home (these threads

terminate). All other passengers get entertained on the flight in transit to their destination (use wait).

Two hours pass, and the plane prepares for landing. The flight attendant notifies the passengers with an announcement over the loud speaker.

The plane lands and the passengers wait for the go-ahead to disembark the plane. When the flight attendant turns off the seatbelt light, passengers are asked (notified) to leave the plane in ascending order of their seat number (let’s say on the plane you have Thread- 3 (seat 2), Thread-4 (seat 3), Thread-2 (seat 4) and Thread-1 (seat 1); Make sure that the passengers are notified in the specified order.

The passengers disperse after the flight and go off to their respective destinations (threads terminate). The flight attendant cleans the aircraft, and is the last to leave after all the passengers(thread terminates). The last passenger to leave will notify the flight attendant.

Skills: Java, Software Architecture, Engineering

See more: building airplane flying, building airplane flying illustration, airplane built flying, building airplane flying graphic, graphic airplane flying, youtube building airplane flying, airplane flying psd, image building airplane flying, mutual exclusion algorithm project, project mutual exclusion, code mutual exclusion algorithm memory management, bash mutual exclusion, this job involves changing our current logo we already have the logo designed we just need to create an alpha from, forbidden you don t have permission to access index php on this server additionally a 404 not found error was encountered while, you don t have permission to access http www adobe com go getflashplayer on this server, you don t have permission to access http www adobe com support flash downloads html on this server reference 18 dbc816c3 1462515, you don t have permission to access http www adobe com support flashplayer debug_downloads html on this server reference 18.443, Go to this site: http://linkhelpers.com/paul/ At the top left side you see a hamburger...

About the Employer:
( 0 reviews ) New Hyde Park, United States

Project ID: #24772659

4 freelancers are bidding on average $117 for this job

huzaifarizwan995

Hi, I am a professional programmer and will give you the best work I have an Innovative tech mind with 10 years of experience working as a computer programmer. Capable of working with a variety of technology and softwa More

$30 USD in 1 day
(19 Reviews)
4.4
dimman1

Hello! Hope you are doing well! I have over 5 years of experience in Java software and 2 years mobile development I'm sure i will suit.

$150 USD in 7 days
(1 Review)
0.6
kritisonal

Hi, Read the description. The program is challenging in a good way with respect to OOPS concepts and multi-threading. I can deliver your task with high quality code, having proper classes, variable names and OOPS conc More

$148 USD in 7 days
(1 Review)
0.4
abhishekkmr4520

already have live to show you similar; hi,hope you are doing well:thanks for sharing your project requirement with us. it will be our great pleasure to work on your project. i have checked your project. Yes we can do i More

$140 USD in 7 days
(0 Reviews)
0.0