Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do the program in C++ oop by doing follow below guidelines.I urgently need it .Plz do it it properly.I will Thankful to you. 7 Write

Do the program in C++ oop by doing follow below guidelines.I urgently need it .Plz do it it properly.I will Thankful to you.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed7image text in transcribed

Write a C++ Program that contains a class named as Fight_Rsrvtn_Systm. The program displays the following contents to the user or displays the following menu bar: Please Type 1 for First Class seat. Please Type 2 for Economy Class seat. Please type 3 for cancellation of Booking. Please Type o to Exit Program. Enter Your Choice Here: If the user enters 0 then the program should display the following message on the console. Enter Your Choice Here: 0 Exiting Program. Thanks for Visiting. Have a nice day As the number of seats in an airplane are fixed so you have to fix total number of seats in the plane. Also, the ratio of seats (Business & Economy class) in the plane are fixed as well. So, plan these things accordingly. Whenever a user opts option 1 i.e., he/she wants to book a business class seat simple display the available business class seats in the plane. Seat No. 1 is Empty. Seat No. 2 is Empty. Seat No. 3 is Empty. Seat No. 4 19 Empty.' Seat No. 5 is Empty! Enter Seat Number You want to Reserve: You have to provide user the opportunity to reserve a specific seat number. After the reservation display the following message. Your Seat is reserved. Have a Nice and Safe Journey! After a specific seat was reserved by a user in a specific class if another user wants to book another seat, the previous seat reserved by the first customer should not be visible to the new customer. Let's say the first customer has reserved seat number 2 in the plane so the next time the second customer presses option 1 the following message should be displayed. Seat No. 1 is Empty.' Seat No. 3 is Empty.' Seat No. 4 is Empty.' Seat No. 5 is Empty. Inter Seat Number You want to Reserve: If all the seats in a specific class are reserved, your program should display the following message on the console. Sorry! All the seats are reserved. If all the seats in a specific class are reserved, your program should ask whether a user wants to use a seat in economy class or not. If you want to check Economy seats press 1 If a user selects a specified key, then display the available seats in other class to other. Seat No. 6 is Empty.' Seat No. 7 is Empty. Seat No. 8 is Empty.' Seat No. 9 is Empty.' Seat No. 10 is Empty.' Enter Seat Number You want to Reserve: Usually, front rows in any service are reserved for business class. So, the seats 1-5 are used for business class & 6-10 for economy class. You can alter the flow if you want to. For option 2 your program allow the user to reserve a seat in economy class. Seat No. 6 is Empty.' Seat No. 7 is Empty.' Seat No. 8 is Empty. Seat No. 9 is Empty.' Seat No. 10 is Empty.' Enter Seat Number You want to Reserve: After reservation following message should be displayed. Your Seat is reserved. Have a Nice and Safe Journey! If all the seats in a specific class are reserved, your program should ask whether a user wants to use a seat in economy class or not. If you want to check First Class seats press 1 If the user wants to reserve a seat following menu should be displayed to the user. Seat No. 1 is Empty.' Seat No. 2 is Empty.' Seat No. 3 is empty. Seat No. 4 is Empty.' Seat No. 5 is Empty. Enter Seat Number You want to Reserve: If a user selects option 3 for cancelling a seat only ask him/her to enter the seat number display the following message. Enter Your Choice Here: 3 Please Enter The Seat Number: 7 Your Seat is cancelled. Have a Nice day. As the user has cancelled seat number 7 which lies in the economy class so now if a user selects option number 2 seat number 7 should be displayed as empty. Seat No. 7 is Empty. Special Restrictions: You must devise an object-oriented approach to achieve the above-mentioned goals. The main function only includes the code, which allows you to initialize the Fight_Rsrytn_Systm class. Only one method of Fight_Rsrvtn_Systm class can be explicitly called in body of main. All the other methods created to achieve the above-mentioned objectives, must be implicitly (within other functions/methods) used. Use of goto label is prohibited

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Factory Active Database For Enterprise Computing

Authors: Schur, Stephen

1st Edition

0471558443, 9780471558446

More Books

Students also viewed these Databases questions