This project is designed to manage various aspects of an airport. It includes functionalities to manage employees, flights, and passengers.
The program provides the following features accessible through a menu-driven interface:
- Print Employee Information
- Input Employee ID or '0' for all employees.
- Delete Employee
- Input Employee ID.
- Add Employee
- Follow prompts to input employee details.
- Update Employee
- Input Employee ID.
- Follow prompts to update details.
- Search Employee
- Various search criteria options.
- Print Employee Counts
- Total number of employees.
- Number of employees in a specific role.
- Print Flight Information
- Input Flight ID or '0' for all flights.
- Add Flights
- Follow prompts to input flight details.
- Delete Flight
- Input Flight ID.
- Update Flight
- Input Flight ID.
- Follow prompts to update details.
- Search Flights
- Search by FlightID, Date, Destination, Type, Flights After a Date, Flights Before a Date.
- Count Flights
- Search by FlightID, Date, Destination, Type, Flights After a Date, Flights Before a Date.
- Add Passenger
- Follow prompts to input passenger details.
- Update Passenger
- Input Passenger ID.
- Follow prompts to update details.
- Delete Passenger
- Input Passenger ID.
- Search Passengers
- Search by PassengerID, Name, PassportNumber, Nationality, DateOfBirth, FlightID.
- List Passengers
-
- All: List all passengers.
-
- FlightID: Input a Flight ID to list passengers on that flight.
-
- Nationality: Input a nationality to list passengers of that nationality.
-
- Count Passengers
- Count all passengers, by FlightID, or by Nationality.
- Exit
- Exit the program.
To compile and run the program, you need to have GCC compiler installed on your system.
- Open the terminal (Command Prompt or PowerShell on Windows).
- Navigate to the project directory.
- Run the following command to compile:
- gcc -o airport_mgmt main.c employee.c flight.c passenger.c common.c
- This will compile the source files and generate an executable named
airport_mgmt.
After compilation, you can run the program by executing the following in the terminal:
-
On Windows: .\airport_mgmt
-
On Linux/Unix: ./airport_mgmt