Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A task is assigned you using the knowledge you had in C++ language from the course create a small computerized system that takes care
A task is assigned you using the knowledge you had in C++ language from the course create a small computerized system that takes care of airline reservation system for one plane. The usual operations in this system include adding new reservation record, canceling a reservation, editing a reservation record, and producing different reports or lists. The application they want you to develop is an application that can track data that is similar to the data shown in the following table: to Mobile number Menu Person ID SeatNo* Preference** Person Name 28899900675 66453411 2A Mohammed Ahmed Salem 29988800543 55986743 100D Abdulaziz Shaikha 28889900432 66439724 55B AIMannai Salem 29988800543 55986743 100E Abdulaziz *Note: The airplane has 100 rows, in each row there are seats from A-G. SeatNo is unique value. **Note: I means veg meal, 2 means Non-veg meal, and 3 means No meal. Requirements: Phasel: Within the main function do the following: [In this phase, you are expected to use the following concepts: input/output, selection statements, loops, and files in C++/. You are required to develop the airline reservation System. In this phase you will deal with 2 * txt files. One of them called "reservations.txt", and the other one called "isReserved.txt". In "reservations.txt", you are expected to save all the reservations records as shown in the table above. In "isReserved.txt", you have all the seats of the plane, with the situation of the seat [0 means not taken, and 1 means taken or reserved). The system should perform the following operations: 1. Make a new reservation that asks the user to input data of a new reservation and then add the reservation record to reservations file. Note: o Note: If seat is taken, then you need to inform user about that, and return back for the main menu. 2. List current reservations in a tabular format all the information about each reservation record. 3. Search reservation done by passenger: Ask the user to enter the passenger's ID number, and then display the list of all reservations done by this passenger on the screen. Note: o If the ID number does not exist in the file, then you need to inform the user about that, and return back for the main menu. Airplane Reservation System [1] Make a new Reservation [2] List current reservations [3] Search reservation done by certain passenger [7) Exit Enter your choice: 1 Make a new reservation: Enter person's ID Number: 28889900444 Enter person's mobile number: 66985521 Enter seat number: 4C Enter menu preference(1- Veg Enter person's full name: Mohammed AlShimari 2- lNon Veg 3- No meal):2 .....You made a valid reservation, and record is saved. Airplane Reservation System (1] Make a new Reservation 12) List current reservations 13] Search reservation done by certain passenger 17) Exit Enter your choice: 7 Bye, see you again later! Phase 2: [You will be required to re-organize your code into functions and use arrays). In this phase, you will be continuing in the same project that you created in phase 1 and add three more functionalities. You will also be required to re-organize your code into functions. Move the code that you created in phase I into different functions. For instance, the code that make new reservation should be moved to a function called "makeNewReservation()", The code that displays the menu items should be moved to a function called "menu" and so on... Move all the first 3 menu items into their functions. If one function can handle two different menu items, then create a single function and reuse it. Implement the following new functionalities 1. Change reservation. This function can change the seat number for a certain passenger. Hence, write a function called changeReservation() that takes as parameter the passenger ID, recorded seat number, the new seat number . Notes: o If the passenger ID, or the passed seat number was not reserved by him/her, then inform the user about that, and return back to main menu. o If the new seat number is already taken, then inform the user about that, and return back to main menu. o Otherwise, change the seat number of the passenger and change the information related in all txt files used in this project. 2. Cancel reservation. Write a function called cancelReservation() that takes the seat number. Then you should delete the reservation record from the "reservations.txt" file, and to update "isReserved.txt" file. Note: o If the seat number does not exist in the "reservations.txt file", then inform the user about that, and return back to main menu. 3. Print Status Report: Write a function called printStatusReport() that displays the total number of current reservations, and total number of cancelations performed. A task is assigned you using the knowledge you had in C++ language from the course create a small computerized system that takes care of airline reservation system for one plane. The usual operations in this system include adding new reservation record, canceling a reservation, editing a reservation record, and producing different reports or lists. The application they want you to develop is an application that can track data that is similar to the data shown in the following table: to Mobile number Menu Person ID SeatNo* Preference** Person Name 28899900675 66453411 2A Mohammed Ahmed Salem 29988800543 55986743 100D Abdulaziz Shaikha 28889900432 66439724 55B AIMannai Salem 29988800543 55986743 100E Abdulaziz *Note: The airplane has 100 rows, in each row there are seats from A-G. SeatNo is unique value. **Note: I means veg meal, 2 means Non-veg meal, and 3 means No meal. Requirements: Phasel: Within the main function do the following: [In this phase, you are expected to use the following concepts: input/output, selection statements, loops, and files in C++/. You are required to develop the airline reservation System. In this phase you will deal with 2 * txt files. One of them called "reservations.txt", and the other one called "isReserved.txt". In "reservations.txt", you are expected to save all the reservations records as shown in the table above. In "isReserved.txt", you have all the seats of the plane, with the situation of the seat [0 means not taken, and 1 means taken or reserved). The system should perform the following operations: 1. Make a new reservation that asks the user to input data of a new reservation and then add the reservation record to reservations file. Note: o Note: If seat is taken, then you need to inform user about that, and return back for the main menu. 2. List current reservations in a tabular format all the information about each reservation record. 3. Search reservation done by passenger: Ask the user to enter the passenger's ID number, and then display the list of all reservations done by this passenger on the screen. Note: o If the ID number does not exist in the file, then you need to inform the user about that, and return back for the main menu. Airplane Reservation System [1] Make a new Reservation [2] List current reservations [3] Search reservation done by certain passenger [7) Exit Enter your choice: 1 Make a new reservation: Enter person's ID Number: 28889900444 Enter person's mobile number: 66985521 Enter seat number: 4C Enter menu preference(1- Veg Enter person's full name: Mohammed AlShimari 2- lNon Veg 3- No meal):2 .....You made a valid reservation, and record is saved. Airplane Reservation System (1] Make a new Reservation 12) List current reservations 13] Search reservation done by certain passenger 17) Exit Enter your choice: 7 Bye, see you again later! Phase 2: [You will be required to re-organize your code into functions and use arrays). In this phase, you will be continuing in the same project that you created in phase 1 and add three more functionalities. You will also be required to re-organize your code into functions. Move the code that you created in phase I into different functions. For instance, the code that make new reservation should be moved to a function called "makeNewReservation()", The code that displays the menu items should be moved to a function called "menu" and so on... Move all the first 3 menu items into their functions. If one function can handle two different menu items, then create a single function and reuse it. Implement the following new functionalities 1. Change reservation. This function can change the seat number for a certain passenger. Hence, write a function called changeReservation() that takes as parameter the passenger ID, recorded seat number, the new seat number . Notes: o If the passenger ID, or the passed seat number was not reserved by him/her, then inform the user about that, and return back to main menu. o If the new seat number is already taken, then inform the user about that, and return back to main menu. o Otherwise, change the seat number of the passenger and change the information related in all txt files used in this project. 2. Cancel reservation. Write a function called cancelReservation() that takes the seat number. Then you should delete the reservation record from the "reservations.txt" file, and to update "isReserved.txt" file. Note: o If the seat number does not exist in the "reservations.txt file", then inform the user about that, and return back to main menu. 3. Print Status Report: Write a function called printStatusReport() that displays the total number of current reservations, and total number of cancelations performed. A task is assigned you using the knowledge you had in C++ language from the course create a small computerized system that takes care of airline reservation system for one plane. The usual operations in this system include adding new reservation record, canceling a reservation, editing a reservation record, and producing different reports or lists. The application they want you to develop is an application that can track data that is similar to the data shown in the following table: to Mobile number Menu Person ID SeatNo* Preference** Person Name 28899900675 66453411 2A Mohammed Ahmed Salem 29988800543 55986743 100D Abdulaziz Shaikha 28889900432 66439724 55B AIMannai Salem 29988800543 55986743 100E Abdulaziz *Note: The airplane has 100 rows, in each row there are seats from A-G. SeatNo is unique value. **Note: I means veg meal, 2 means Non-veg meal, and 3 means No meal. Requirements: Phasel: Within the main function do the following: [In this phase, you are expected to use the following concepts: input/output, selection statements, loops, and files in C++/. You are required to develop the airline reservation System. In this phase you will deal with 2 * txt files. One of them called "reservations.txt", and the other one called "isReserved.txt". In "reservations.txt", you are expected to save all the reservations records as shown in the table above. In "isReserved.txt", you have all the seats of the plane, with the situation of the seat [0 means not taken, and 1 means taken or reserved). The system should perform the following operations: 1. Make a new reservation that asks the user to input data of a new reservation and then add the reservation record to reservations file. Note: o Note: If seat is taken, then you need to inform user about that, and return back for the main menu. 2. List current reservations in a tabular format all the information about each reservation record. 3. Search reservation done by passenger: Ask the user to enter the passenger's ID number, and then display the list of all reservations done by this passenger on the screen. Note: o If the ID number does not exist in the file, then you need to inform the user about that, and return back for the main menu. Airplane Reservation System [1] Make a new Reservation [2] List current reservations [3] Search reservation done by certain passenger [7) Exit Enter your choice: 1 Make a new reservation: Enter person's ID Number: 28889900444 Enter person's mobile number: 66985521 Enter seat number: 4C Enter menu preference(1- Veg Enter person's full name: Mohammed AlShimari 2- lNon Veg 3- No meal):2 .....You made a valid reservation, and record is saved. Airplane Reservation System (1] Make a new Reservation 12) List current reservations 13] Search reservation done by certain passenger 17) Exit Enter your choice: 7 Bye, see you again later! Phase 2: [You will be required to re-organize your code into functions and use arrays). In this phase, you will be continuing in the same project that you created in phase 1 and add three more functionalities. You will also be required to re-organize your code into functions. Move the code that you created in phase I into different functions. For instance, the code that make new reservation should be moved to a function called "makeNewReservation()", The code that displays the menu items should be moved to a function called "menu" and so on... Move all the first 3 menu items into their functions. If one function can handle two different menu items, then create a single function and reuse it. Implement the following new functionalities 1. Change reservation. This function can change the seat number for a certain passenger. Hence, write a function called changeReservation() that takes as parameter the passenger ID, recorded seat number, the new seat number . Notes: o If the passenger ID, or the passed seat number was not reserved by him/her, then inform the user about that, and return back to main menu. o If the new seat number is already taken, then inform the user about that, and return back to main menu. o Otherwise, change the seat number of the passenger and change the information related in all txt files used in this project. 2. Cancel reservation. Write a function called cancelReservation() that takes the seat number. Then you should delete the reservation record from the "reservations.txt" file, and to update "isReserved.txt" file. Note: o If the seat number does not exist in the "reservations.txt file", then inform the user about that, and return back to main menu. 3. Print Status Report: Write a function called printStatusReport() that displays the total number of current reservations, and total number of cancelations performed.
Step by Step Solution
★★★★★
3.34 Rating (166 Votes )
There are 3 Steps involved in it
Step: 1
intlate C ionem inclurte r melu...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started