Airline Reservations System
Updated 18 Apr 2020
Project Name: Airline Reservations System
A small airline has just purchased a computer for its new automated reservations system.
The president has asked you to program the new system.
You will write a program to assign seats on each flight of the airlines' two planes (each with capacity: 10 seats).
Your program should display the following menu of alternatives:
Please type 1 for destination "Aswan"
Please type 2 for destination "Alexandria"
If the person types 1, then your program should assign a seat to the first plane (seats 1–10).
if the person types 2, then your program should assign a seat to the second plane (seats 1–10).
Your program should then print a boarding pass indicating the person's seat number
and whether it’s destination is to Aswan or Alexandria.
Use a single-sub scripted array to represent the seating chart of e each plane.
Initialize all the elements of the array to 0 to indicate that all seats are empty.
As each seat is assigned, set the corresponding element of the array to 1 to indicate that the seat is no longer available.
Your program should, of course, never assign a seat that has already been assigned.
When the requested plane is full, your program should print the message "Next flight leaves in 3 hours.
AbdElrahman Mahran (2023). Airline Reservations System (https://www.mathworks.com/matlabcentral/fileexchange/75097-airline-reservations-system), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.