Answer to Question #264745 in UNIX/Linux Programming for Ahsan wains

Question #264745

You should then create 8 new threads, each one representing a (uniquely numbered) plane; the main function should wait for all of the threads to complete and then exit. Each thread represents an airplane, and should repeatedly follow these steps: 1. board. Waits for 12 passengers to get on the plane. Between each available passenger boarding a random delay of between 0 and 2 seconds should be enforced. This can be accomplished by calling sleep(rand()%3) after each passenger boards. 2. The associated plane should then be shown taxi-ing to the runway. See the provided AirportAnimator class ! 3. The associate plane should then use the runway to take off, animating such (see the provided AirportAnimator class!) Of course, the plane should wait for exclusive access to the runway. 4. The plane should then go on tour. This basically just sleeps for between 15 and 45 seconds, and can be accomplished by calling sleep(15+rand()%31).


1
Expert's answer
2021-11-14T18:03:30-0500
Dear Ahsan wains, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS