6. Show Flight Info Enter Airline Code: QA Enter Flight Number: 404 Flight: Q4404 Type: I status: S First Class Seats: 16 Business Class Seats: 25 Economy Class Seats: 193 Departure day: M Departure time: 1450 Departure airport: BOS Departure gate: A11 Arrival day: T Arrival time: 1545 Arrival airport: DXB Arrival gate: $12 Press Enter to continue. 7. Show Departures Enter Airport Code: BOS Enter Day: M Current time is 1230. BOS Departures: Flight Code status Time QA177 DA404 A S Press Enter to continue. 2. Clear Schedule 0625 1450 Destination Gate CDG A13 DXB A11 Are you sure you want to clear the schedule and start over? (y/n) y Schedule cleared. Press Enter to continue. Welcome Screen Welcome to the Flight scheduler! Please remember to always use U, M, T, W, R, F, S, for entering the day of the week, and to always use military time for entering the time. Please make your choice by entering the corresponding menu number: 1. Set Clock 2. Clear Schedule 3. Add Airline 4. Add Flight 5. Cancel Flight 6. Show Flight Info 7. Show Departures 8. Show Arrivals 9. Find Flights Between Two Airports 10. Exit 1. Set Clock Enter U, M, T, W, R, F, or s for corresponding day of the week: M Please enter time in military notation: 1230 Day set to M and time set to 1230 Press Enter to continue 3. Add Airline Airline name: Qatar Airways Airline code: QA Delta Aircraft: Boeing 787 Dreamliner Boeing first class seat capacity: 16 Boeing business class seat capacity: 25 Boeing economy class seat capacity: 193 Qatar Airways succesfully added. Press Enter to continue. 4. Add Flight Airline code: DB DB was not found. Try again? (y/n) y Airline code: QA Flight number: 484 Type (D for domestic or I for international): I Departure airport code: BOS Departure gate: A11 Departure day: M Departure time: 1450 Arrival airport code: DXB Arrival gate: $12 Arrival day: M Arrival time: 1545 Flight Q4484 scheduled succesfully. Press Enter to continue.
Design an application that tracks airline flights. The Flight Schedule is the most important part of the application, which is a collection of flights. Each flight has several attributes, including the Airline and the Aircraft information. The Airline is identified by a name, such as Delta Air, and a code for all of its flights, such as DL. For simplicity, you can assume that every airline has a fleet of one particular type of aircraft. This allows the user to enter only the airline code to fill the rest of the aircraft data when the flight data is entered into the system.
-
Flight Schedule Design:
- Define the structure for the Flight Schedule.
- Identify data fields for Airline Name, Airline Code, Aircraft Name/Model, Seat Capacity, and Class-specific seat numbers.
- Identify data fields for each flight, including Airline Code, Flight number, Flight status, and Flight Type.
- Define Departure data fields: Day-of-the-week, Departure Time, Airport Code, Departure Gate.
- Define Arrival data fields: Day-of-the-week, Arrival Time, Airport Code, Arrival Gate.
-
Menu-Driven Application:
- Create a menu structure with options:
- Set Clock
- Delete all existing Aircraft/Flight Schedule records and start over
- Add Airline/Aircraft
- Add Flight
- Cancel Flight
- Show Flight Info
- Show all departures for a particular Airport on a given day-of-the-week
- Show all arrived flights and scheduled arrivals for a particular Airport on a given day-of-the-week
- (Advanced) Find flights between two Airports
- Create a menu structure with options:
-
Set Clock:
- Allow the user to set the current military time for reporting purposes.
- Assume no time zones for simplicity.
-
Delete Records:
- Provide an option to delete all existing Aircraft/Flight Schedule records.
-
Add Airline/Aircraft:
- Implement functionality to add a new Airline and associated Aircraft.
- Validate and store information such as Airline Name, Airline Code, Aircraft Name/Model, Seat Capacity, and Class-specific seat numbers.
-
Add Flight:
- Implement functionality to add a new Flight.
- Ensure no duplicate flight numbers within the same airline.
- Validate and store information such as Airline Code, Flight number, Flight status, Flight Type, Departure data, and Arrival data.
-
Cancel Flight:
- Implement functionality to cancel a flight.
- Update the status field to 'C' without removing the flight record.
-
Show Flight Info:
- Ask the user for a flight number (combination of airline code and flight number) and print all flight data.
-
Show Departures:
- Ask the user for an airport code and a day-of-the-week.
- List all departures for the specified airport on the given day, ordered by departure time.
- Include canceled flights.
-
Show Arrivals:
- Ask the user for an airport code and a day-of-the-week.
- List all arrived flights and scheduled arrivals for the specified airport on the given day, ordered by arrival time.
- Include canceled flights.
-
Advanced: Find Flights Between Two Airports:
- Implement functionality to find flights between two airports, including connecting flights with an intermediate stop.
- Calculate layover time between connecting flights.
Unlock instant AI solutions
Tap the button
to generate a solution