A new start-up airline called “Crashed Aircraft Stationary Holdings” (or C.A.S.H.) requires a new software package to help them with customer bookings. Each flight has seats available in several categories. They need an application which will allow them to take bookings for the flights without exceeding their seat capacity. They also need to make sure the aircraft’s manifest (staff, passengers and baggage) does not exceed the maximum weight threshold, or the aircraft cannot take off.
Each flight is setup with a unique code or flight number, which identifies that flight. Each flight also includes;
For each passenger, you will need to store their booking number, booking status, name, contact details, weight (Kg) including themselves and any luggage (max 200Kg per person), seating category.
Booking numbers are consecutive numbers starting at 1 for each new flight. A customer’s booking status may be either “Paid” or “Boarded”. Only those customers that made the departure time and physically boarded the aircraft get the “Boarded” status, the other passengers missed the flight (you decide if they made it or not).
C.A.S.H. is still working out what to name its seating categories, however the staff are currently referring to them as; Seating category.
Each C.A.S.H. flight also has a crew complement of five people. You will need to record similar information as you do for passengers, but without any booking information. You will also need to store their job title (e.g. Captain, Chief Steward, etc.) and their hourly pay rate.
Each passenger should be given a random holiday budget of up to $4000 to purchase their airline ticket. A passenger will always take the best seat available to their budget, and will not accept a seat in a lesser category; instead they will catch a different flight. This means if their budget is $1010, they will take an “Average Joe” seat and will not accept a vacant “Impoverished Student” seat.
When setting up the flight, you need to first load the 5 staff members (they have assigned seats and don’t affect passenger seating). Then you need to load the passengers. The aircraft can carry a maximum of 11500Kg. Only people that are physically on-board the aircraft will add to the weight. If there is an available seat for the customer, but the aircraft would exceed its weight limit, you must cancel their booking.
C.A.S.H. wants to know the following;
The class that produces the information C.A.S.H. desires should implement the following Java interface – Report interface.
The report should be output to a JPanel, not printed to the console. You program should process 100 customers.