This C++ program implements a simple Airline Reservation System. Users can input customer details, choose a destination, book a flight, and generate a ticket with associated charges. The program is menu-driven and allows users to navigate through different functionalities.
-
AirlineReservationSystem.cpp: Main C++ program containing the implementation of the Airline Reservation System.
-
records.txt: Text file used to store customer ticket details.
- The
Management
class initiates the main menu of the Airline Reservation System.
- The
Details
class manages customer details, such as name, gender, phone number, age, address, and customer ID.
- The
Registration
class handles flight registration, including the selection of destinations, specific flights, and associated charges.
- The
Ticket
class extends theRegistration
andDetails
classes to generate and display customer tickets.
- Displays the main menu with options to add customer details, book a flight, generate a ticket, or exit the program.
- Collects and stores customer details.
- Displays available flights for different destinations and allows users to select a flight.
- Generates a customer ticket with destination and flight details, including charges.
- Displays the generated ticket.
- Compile and run the program using a C++ compiler.
g++ AirlineReservationSystem.cpp -o AirlineReservationSystem
./AirlineReservationSystem
-
Follow the on-screen instructions to navigate through the Airline Reservation System.
-
After completing the booking process, the generated ticket will be stored in the
records.txt
file. -
Users can view their ticket by selecting the appropriate option in the main menu.
- This is a basic implementation and may require enhancements for a real-world scenario.
- Additional error handling and input validation can be added for improved robustness.
Feel free to customize and extend the code according to your requirements.