SlideShare a Scribd company logo
An airline uses a computer system to maintain flight sales information. For planning purposes,
the airline must know what seats are on the plane, what seats are available, what seats are
booked, and must have the ability to change the status of a seat from available to booked and
vice versa. For this assignment, you will be implementing some of the functionality of the airline
computer system. You will need to implement the following steps.
(1) Create the initial vectors for seats on the plane and seat status. The plane for our test case has
rows 1 through 5 and each row has seat A through E. However, your code should be able to
adapt to different size planes. The seat status is a 0 if the seat is available or a 1 if the seat is
booked, and, therefore, not available.
(2) Implement a menu of options for the user. Following the initial setup of the vectors, the
program outputs the menu. The program should also output the menu again after a user chooses
an option. The program ends when the user chooses the option to Quit.
Ex:
Menu options:
1. Display All Seats Status:
2. Total Number of Available Seats:
3. Display Available Seats:
4. Book Seat:
5. Cancel Seat:
6. Change Seat:
7. Quit:
Please select an option:
(3) Implement the "Display All Seats Status" menu option. Be sure to write a separate function
for each menu option.
Ex:
Seat Status
1A 0
1B 0
1C 0
1D 0
1E 0
2A 0
...
(4) Implement the "Total Number of Available Seats" menu option.
Ex:
Number of available seats: 20
(5) Implement the "Display Available Seats" menu option. This function should show a list of
available seats.
Ex:
Available seats:
1A
1B
1C
1D
1E
2A
...
(6) Implement the "Book Seat" menu option. This function should take in the seat to book and
then should change the status of that seat to unavailable. After the function, the status of all seats
should be displayed.
Ex:
Enter seat to book: 1A
Seat Status
1A 1
1B 0
1C 0
1D 0
1E 0
2A 0
...
(7) Add logic to the "Book Seat" menu option that will not allow the user to book a seat that is
already booked.
Ex:
Enter seat to book: 1A
That seat is already taken.
Enter seat to book: 1B
Seat Status
1A 1
1B 1
1C 0
1D 0
1E 0
2A 0
...
(8) Implement the "Cancel Seat" menu option. This function should take in the seat to cancel and
then should change the status of that seat to available. After the function, the status of all seats
should be displayed.
Ex:
Enter seat to cancel: 1A
Seat Status
1A 0
1B 0
1C 0
1D 0
1E 0
2A 0
...
(9) Implement the "Change Seat" menu option. This function should take in the seat to cancel ,
the seat to book, and then should change the status of those seats. After the function, the status of
all seats should be displayed.
Ex:
Enter seat to cancel: 1A
Enter seat to book: 1B
Seat Status
1A 0
1B 1
1C 0
1D 0
1E 0
2A 0
...
An airline uses a computer system to maintain flight sales information. For planning purposes,
the airline must know what seats are on the plane, what seats are available, what seats are
booked, and must have the ability to change the status of a seat from available to booked and
vice versa. For this assignment, you will be implementing some of the functionality of the airline
computer system. You will need to implement the following steps.
(1) Create the initial vectors for seats on the plane and seat status. The plane for our test case has
rows 1 through 5 and each row has seat A through E. However, your code should be able to
adapt to different size planes. The seat status is a 0 if the seat is available or a 1 if the seat is
booked, and, therefore, not available.
(2) Implement a menu of options for the user. Following the initial setup of the vectors, the
program outputs the menu. The program should also output the menu again after a user chooses
an option. The program ends when the user chooses the option to Quit.
Ex:
Menu options:
1. Display All Seats Status:
2. Total Number of Available Seats:
3. Display Available Seats:
4. Book Seat:
5. Cancel Seat:
6. Change Seat:
7. Quit:
Please select an option:
(3) Implement the "Display All Seats Status" menu option. Be sure to write a separate function
for each menu option.
Ex:
Seat Status
1A 0
1B 0
1C 0
1D 0
1E 0
2A 0
...
(4) Implement the "Total Number of Available Seats" menu option.
Ex:
Number of available seats: 20
(5) Implement the "Display Available Seats" menu option. This function should show a list of
available seats.
Ex:
Available seats:
1A
1B
1C
1D
1E
2A
...
(6) Implement the "Book Seat" menu option. This function should take in the seat to book and
then should change the status of that seat to unavailable. After the function, the status of all seats
should be displayed.
Ex:
Enter seat to book: 1A
Seat Status
1A 1
1B 0
1C 0
1D 0
1E 0
2A 0
...
(7) Add logic to the "Book Seat" menu option that will not allow the user to book a seat that is
already booked.
Ex:
Enter seat to book: 1A
That seat is already taken.
Enter seat to book: 1B
Seat Status
1A 1
1B 1
1C 0
1D 0
1E 0
2A 0
...
(8) Implement the "Cancel Seat" menu option. This function should take in the seat to cancel and
then should change the status of that seat to available. After the function, the status of all seats
should be displayed.
Ex:
Enter seat to cancel: 1A
Seat Status
1A 0
1B 0
1C 0
1D 0
1E 0
2A 0
...
(9) Implement the "Change Seat" menu option. This function should take in the seat to cancel ,
the seat to book, and then should change the status of those seats. After the function, the status of
all seats should be displayed.
Ex:
Enter seat to cancel: 1A
Enter seat to book: 1B
Seat Status
1A 0
1B 1
1C 0
1D 0
1E 0
2A 0
...

More Related Content

PDF
coe808 proj repot
PDF
OOP Assignment 03.pdf
PDF
Fadal Command Menus: User Manual
DOCX
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
PDF
A06
DOCX
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
PDF
elevator problem.pdf
PDF
The java code works, I just need it to display the results as in t.pdf
coe808 proj repot
OOP Assignment 03.pdf
Fadal Command Menus: User Manual
10.USING THE ECLIPSE DEBUGGERupdated 8618This t.docx
A06
CMIS 102 Hands-On LabWeek 6OverviewThis hands-on lab .docx
elevator problem.pdf
The java code works, I just need it to display the results as in t.pdf

Similar to An airline uses a computer system to maintain flight sales informa.pdf (20)

PDF
Design functional solutions in Java, a practical example
PDF
Developing the State Machine with code c# for application and game development
PDF
Real Time Robot Control System Software Description_3
PDF
Application Of The Three-In-One Control Platform Based On OPC In The Lifting-...
PDF
Ch03 supplement 1
PPTX
RSA Training.pptx
PDF
Ch6 v70 sfc_en
PDF
[Capella Day 2019] Model execution and system simulation in Capella
PDF
Model Execution and System Simulation
PPTX
Applet and graphics programming
DOCX
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
PPTX
Stack & heap
PPTX
Operators in java
PDF
Robot Studio
PDF
Mac OS Lion Tips and Tricks
PPT
Lect 3-4 Zaheer Abbas
PDF
Arena tutorial
DOCX
Interview Preparation
PDF
roboguide seminar robotic software refrence.pdf
PPTX
Creating GUI.pptx Gui graphical user interface
Design functional solutions in Java, a practical example
Developing the State Machine with code c# for application and game development
Real Time Robot Control System Software Description_3
Application Of The Three-In-One Control Platform Based On OPC In The Lifting-...
Ch03 supplement 1
RSA Training.pptx
Ch6 v70 sfc_en
[Capella Day 2019] Model execution and system simulation in Capella
Model Execution and System Simulation
Applet and graphics programming
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Stack & heap
Operators in java
Robot Studio
Mac OS Lion Tips and Tricks
Lect 3-4 Zaheer Abbas
Arena tutorial
Interview Preparation
roboguide seminar robotic software refrence.pdf
Creating GUI.pptx Gui graphical user interface
Ad

More from adyantgroup (20)

PDF
An LVAD patient presents to the ED with a history of vomiting and de.pdf
PDF
An increase in the share price may be the result of the information .pdf
PDF
Amerika Birleik Devletlerinde 2014te GSYH deflat�r� 104 idi ve 201.pdf
PDF
Aadakilerden hangisinin Kanada ihracatn artrma olasl en y�ksektir.pdf
PDF
Aadakilerden hangisi yakalama etkisi ile tutarldr A. Amerika Birleik .pdf
PDF
Aadakilerden hangisi kripto para birimi varlk snfnn dramatik getiri .pdf
PDF
Aadakilerden hangisi proteinlerin ARE g�revlerindendir Her bir ifad.pdf
PDF
Aadakilerden hangisi PowerPoint sununuzu tasarlamak i�in en iyi uygu.pdf
PDF
Aadakilerden hangisi deiime diren�le baa �kma stratejilerinden biri .pdf
PDF
Aadakiler, bir BLS anketi katlmcsnn raporudur Gezdiim evlerde 9.pdf
PDF
Aadakilerden hangisi bir aratrma tasarm deildir A. �nemli deneyse.pdf
PDF
Aadakilerden hangisi bilan�onun uygun bi�imini tanmlar 1) Toplam .pdf
PDF
Aadakilerden hangisi Bank of Canadann baz fonksiyonlarn tanmlamaz .pdf
PDF
Aadaki veriler, Deltann ortak b�y�kl�kteki mali tablosundan alnmtr.pdf
PDF
Aadaki tablo, Brezilya hisse senetlerinin nominal getirilerini ve en.pdf
PDF
Aadaki ifadelerden hangisi solucan i�in dorudur Kendini bir ana p.pdf
PDF
Aadaki ifadelerden hangisi YANLI A.Baarl stratejistler, zayf bir .pdf
PDF
Alteran Corporation purchased office equipment for $2.0 million at t.pdf
PDF
Allied Merchandisers was organized on May 1. Macy Company is a major.pdf
PDF
All businesses in this case study are fictional and any resemblance .pdf
An LVAD patient presents to the ED with a history of vomiting and de.pdf
An increase in the share price may be the result of the information .pdf
Amerika Birleik Devletlerinde 2014te GSYH deflat�r� 104 idi ve 201.pdf
Aadakilerden hangisinin Kanada ihracatn artrma olasl en y�ksektir.pdf
Aadakilerden hangisi yakalama etkisi ile tutarldr A. Amerika Birleik .pdf
Aadakilerden hangisi kripto para birimi varlk snfnn dramatik getiri .pdf
Aadakilerden hangisi proteinlerin ARE g�revlerindendir Her bir ifad.pdf
Aadakilerden hangisi PowerPoint sununuzu tasarlamak i�in en iyi uygu.pdf
Aadakilerden hangisi deiime diren�le baa �kma stratejilerinden biri .pdf
Aadakiler, bir BLS anketi katlmcsnn raporudur Gezdiim evlerde 9.pdf
Aadakilerden hangisi bir aratrma tasarm deildir A. �nemli deneyse.pdf
Aadakilerden hangisi bilan�onun uygun bi�imini tanmlar 1) Toplam .pdf
Aadakilerden hangisi Bank of Canadann baz fonksiyonlarn tanmlamaz .pdf
Aadaki veriler, Deltann ortak b�y�kl�kteki mali tablosundan alnmtr.pdf
Aadaki tablo, Brezilya hisse senetlerinin nominal getirilerini ve en.pdf
Aadaki ifadelerden hangisi solucan i�in dorudur Kendini bir ana p.pdf
Aadaki ifadelerden hangisi YANLI A.Baarl stratejistler, zayf bir .pdf
Alteran Corporation purchased office equipment for $2.0 million at t.pdf
Allied Merchandisers was organized on May 1. Macy Company is a major.pdf
All businesses in this case study are fictional and any resemblance .pdf
Ad

Recently uploaded (20)

PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
GDM (1) (1).pptx small presentation for students
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Lesson notes of climatology university.
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Computing-Curriculum for Schools in Ghana
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Presentation on HIE in infants and its manifestations
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
master seminar digital applications in india
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
RMMM.pdf make it easy to upload and study
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Complications of Minimal Access Surgery at WLH
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
A systematic review of self-coping strategies used by university students to ...
STATICS OF THE RIGID BODIES Hibbelers.pdf
GDM (1) (1).pptx small presentation for students
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Final Presentation General Medicine 03-08-2024.pptx
Lesson notes of climatology university.
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
Computing-Curriculum for Schools in Ghana
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Presentation on HIE in infants and its manifestations
Module 4: Burden of Disease Tutorial Slides S2 2025
master seminar digital applications in india
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
RMMM.pdf make it easy to upload and study
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
01-Introduction-to-Information-Management.pdf
Complications of Minimal Access Surgery at WLH
Supply Chain Operations Speaking Notes -ICLT Program
A systematic review of self-coping strategies used by university students to ...

An airline uses a computer system to maintain flight sales informa.pdf

  • 1. An airline uses a computer system to maintain flight sales information. For planning purposes, the airline must know what seats are on the plane, what seats are available, what seats are booked, and must have the ability to change the status of a seat from available to booked and vice versa. For this assignment, you will be implementing some of the functionality of the airline computer system. You will need to implement the following steps. (1) Create the initial vectors for seats on the plane and seat status. The plane for our test case has rows 1 through 5 and each row has seat A through E. However, your code should be able to adapt to different size planes. The seat status is a 0 if the seat is available or a 1 if the seat is booked, and, therefore, not available. (2) Implement a menu of options for the user. Following the initial setup of the vectors, the program outputs the menu. The program should also output the menu again after a user chooses an option. The program ends when the user chooses the option to Quit. Ex: Menu options: 1. Display All Seats Status: 2. Total Number of Available Seats: 3. Display Available Seats: 4. Book Seat: 5. Cancel Seat: 6. Change Seat: 7. Quit: Please select an option: (3) Implement the "Display All Seats Status" menu option. Be sure to write a separate function for each menu option.
  • 2. Ex: Seat Status 1A 0 1B 0 1C 0 1D 0 1E 0 2A 0 ... (4) Implement the "Total Number of Available Seats" menu option. Ex: Number of available seats: 20 (5) Implement the "Display Available Seats" menu option. This function should show a list of available seats. Ex: Available seats: 1A 1B 1C 1D 1E 2A ... (6) Implement the "Book Seat" menu option. This function should take in the seat to book and then should change the status of that seat to unavailable. After the function, the status of all seats should be displayed.
  • 3. Ex: Enter seat to book: 1A Seat Status 1A 1 1B 0 1C 0 1D 0 1E 0 2A 0 ... (7) Add logic to the "Book Seat" menu option that will not allow the user to book a seat that is already booked. Ex: Enter seat to book: 1A That seat is already taken. Enter seat to book: 1B Seat Status 1A 1
  • 4. 1B 1 1C 0 1D 0 1E 0 2A 0 ... (8) Implement the "Cancel Seat" menu option. This function should take in the seat to cancel and then should change the status of that seat to available. After the function, the status of all seats should be displayed. Ex: Enter seat to cancel: 1A Seat Status 1A 0 1B 0 1C 0 1D 0 1E 0 2A 0 ... (9) Implement the "Change Seat" menu option. This function should take in the seat to cancel , the seat to book, and then should change the status of those seats. After the function, the status of all seats should be displayed. Ex: Enter seat to cancel: 1A
  • 5. Enter seat to book: 1B Seat Status 1A 0 1B 1 1C 0 1D 0 1E 0 2A 0 ... An airline uses a computer system to maintain flight sales information. For planning purposes, the airline must know what seats are on the plane, what seats are available, what seats are booked, and must have the ability to change the status of a seat from available to booked and vice versa. For this assignment, you will be implementing some of the functionality of the airline computer system. You will need to implement the following steps. (1) Create the initial vectors for seats on the plane and seat status. The plane for our test case has rows 1 through 5 and each row has seat A through E. However, your code should be able to adapt to different size planes. The seat status is a 0 if the seat is available or a 1 if the seat is booked, and, therefore, not available. (2) Implement a menu of options for the user. Following the initial setup of the vectors, the program outputs the menu. The program should also output the menu again after a user chooses an option. The program ends when the user chooses the option to Quit. Ex:
  • 6. Menu options: 1. Display All Seats Status: 2. Total Number of Available Seats: 3. Display Available Seats: 4. Book Seat: 5. Cancel Seat: 6. Change Seat: 7. Quit: Please select an option: (3) Implement the "Display All Seats Status" menu option. Be sure to write a separate function for each menu option. Ex: Seat Status 1A 0 1B 0 1C 0 1D 0 1E 0 2A 0 ... (4) Implement the "Total Number of Available Seats" menu option. Ex: Number of available seats: 20 (5) Implement the "Display Available Seats" menu option. This function should show a list of available seats. Ex:
  • 7. Available seats: 1A 1B 1C 1D 1E 2A ... (6) Implement the "Book Seat" menu option. This function should take in the seat to book and then should change the status of that seat to unavailable. After the function, the status of all seats should be displayed. Ex: Enter seat to book: 1A Seat Status 1A 1 1B 0 1C 0 1D 0 1E 0 2A 0 ... (7) Add logic to the "Book Seat" menu option that will not allow the user to book a seat that is already booked.
  • 8. Ex: Enter seat to book: 1A That seat is already taken. Enter seat to book: 1B Seat Status 1A 1 1B 1 1C 0 1D 0 1E 0 2A 0 ... (8) Implement the "Cancel Seat" menu option. This function should take in the seat to cancel and then should change the status of that seat to available. After the function, the status of all seats should be displayed. Ex: Enter seat to cancel: 1A Seat Status 1A 0 1B 0 1C 0 1D 0 1E 0
  • 9. 2A 0 ... (9) Implement the "Change Seat" menu option. This function should take in the seat to cancel , the seat to book, and then should change the status of those seats. After the function, the status of all seats should be displayed. Ex: Enter seat to cancel: 1A Enter seat to book: 1B Seat Status 1A 0 1B 1 1C 0 1D 0 1E 0 2A 0 ...