Page 1 of 1

Code in java This is a big question but I only need part 1. I put the entire introduction in this post but not all of i

Posted: Mon May 02, 2022 11:39 am
by answerhappygod
Code in java
This is a big question but I only need part 1. I put the
entire introduction in this post but not all of it is
relevant. Look at part 1 before looking at the context
so you won't have to read as much.
Code In Java This Is A Big Question But I Only Need Part 1 I Put The Entire Introduction In This Post But Not All Of I 1
Code In Java This Is A Big Question But I Only Need Part 1 I Put The Entire Introduction In This Post But Not All Of I 1 (134.72 KiB) Viewed 55 times
Code In Java This Is A Big Question But I Only Need Part 1 I Put The Entire Introduction In This Post But Not All Of I 2
Code In Java This Is A Big Question But I Only Need Part 1 I Put The Entire Introduction In This Post But Not All Of I 2 (39.56 KiB) Viewed 55 times
Code In Java This Is A Big Question But I Only Need Part 1 I Put The Entire Introduction In This Post But Not All Of I 3
Code In Java This Is A Big Question But I Only Need Part 1 I Put The Entire Introduction In This Post But Not All Of I 3 (20.56 KiB) Viewed 55 times
Imagine you work for Robert F. Kennedy (RFK) Airport, a new 20 terminal airport built in the middle of the bustling state of Montana. RFK is still in the preliminary planning stages and the state of Montana wants to have a better idea of the outgoing air traffic they could expect at RFK. So, RFK's investors hire some of the best statisticians to model the outgoing air traffic at RFK. First, these statisticians model the typical Flight out of RFK. They find that the Zoeing 373 is the most popular commercial jetliner used with a capacity of 15 Passengers; out of these 15 passengers, 2 are First Class, 3 are Business Class, 4 are premium economy, and 6 are economy. So, these statisticians decide to model each flight using the Zoeing 373 as the outgoing plane. Next, they find that each flight typically has 25 minutes to board followed by 5 minutes to depart. Finally, they talk with RFK planners for more details on how boarding and departures will operate at RFK. Each flight also has a BoardingQueue where a maximum of 10 passengers can wait before being let on the flight. At this queue, passengers are prioritized by flight class with ties in priority broken by passengerID (keep reading for more information on this ID). When boarding (dequeuing) people from this queue, if no more room exists in their class's seats and they're of a higher class than open seats, they can take a seat from the next lower class available. Now, here's where you come in. These statisticians have modeled outgoing air traffic every minute using the following events and successive sub-events: 1. For each boarding flight, a passenger is dequeued from a flight's BoardingQueue and counted against a plane's capacity. (P=Given) 2. For each boarding flight, a passenger arrives at a flight's BoardingQueue (P = Given) a. This passenger is first class (P=0.1) b. This passenger is business class (P = 0.1) C. This passenger is premium economy (P=0.3) d. This passenger is economy (P=0.4) e. This passenger has СOVID-19, extending all current departures and boarding by 10 minutes (i.e. if a plane is currently boarding, its allocated departing time is not extended). (P=0.1) 3. A new flight begins boarding at RFK (P = Given) a. This flight is normal (P=0.95) b. This flight is Air Force 1, pausing all other departures and boarding until its departure (P=0.05) Some probabilities will be provided to you at the start of your program. Your task is, given these probabilities, to simulate outgoing air traffic at RFK as shown in the I/O examples below. You must ONLY use nextFloat() from Java.util.Random for this assignment. You cannot use any other library and you MUST set a seed given to you at the start of your program. For each event, in the order of events given above, you must call nextFloat once a minute to determine if the event occurs. If an event does occur, you must determine a successive sub-event, if applicable, by calling next Float once as well. Details on using next Float and setting a seed can be found in the Resources section of this assignment.
All events are independent of each other, meaning they can all occur every minute. However, be aware that each successive sub-event is mutually exclusive, meaning they cannot happen simultaneously (e.x. we won't have a COVID positive person who is also in first class). Any passenger who's has СOVID-19 is not allowed into a flight's BoardingQueue. Due to a minute being too long, within your code, print as much as you can until user input is necessary. Every passenger is given a passenger ID equal to their arrival index (i.e. arrival index N implies this person was the Nth person to enter this particular flight's BoardingQueue before that flight's final departure). If all terminals are taken, refuse any new flights. If a plane becomes full, you must start departure. If a BoardingQueue is full, refuse any new passengers until space becomes available. Examples of refusal can be found in the I/O examples.
1. Passenger Write a fully documented class named Passenger that contains parameters on the information about itself. The Person class should contain an identifying passengerID, arrival time in minutes), and their traveling class • public Passenger() constructor and also public Passenger ...parameters as needed...) One (enum) TravelClass: o passClass Two int variables: o passengerID o arrival Time . .