Find Jobs
Hire Freelancers

flying to wonderland

$30-250 USD

Closed
Posted about 4 years ago

$30-250 USD

Paid on delivery
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.
Project ID: 24772659

About the project

3 proposals
Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
3 freelancers are bidding on average $109 USD for this job
User Avatar
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 software solutions and managing databases. The valuable team member who has experience diagnosing problems and developing solutions. Extensive expertise in networking systems and working with mainframe computers. A talented leader with unique ideas and a history of successful contributions in the field. -Solid background and advanced knowledge in computer development software including C++, Python, R, Spark, Visual Basic, and Maven. -Skilled in working with database management tools such as MySQL, Hadoop, Sybase, and MongoDB. -Highly organized with an exceptional commitment to task completion and quality assurance when working with computer software programs. -Committed to delivering company objectives to projects and results to customers and improving each version of the software I engage with. -Ability to solve complex problems successfully with minimal guidance or help using a logical reasoning technique and strong attention to detail. Inbox me for more details. Thanks
$30 USD in 1 day
5.0 (22 reviews)
4.4
4.4
User Avatar
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
5.0 (1 review)
0.6
0.6
User Avatar
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 concepts. Let's discuss more on your additional requirements and the deadline of this task. Thanks, Kriti
$148 USD in 7 days
5.0 (1 review)
0.4
0.4

About the client

Flag of UNITED STATES
Mineola, United States
0.0
0
Payment method verified
Member since Oct 30, 2018

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.