Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write c++ Write a program that can be used to assign seats for a small commercial airline. The airline has only one type of airplane

Write c++
image text in transcribed
Write a program that can be used to assign seats for a small commercial airline. The airline has only one type of airplane that contains 11 rows of 7 seats. Rows 1 and 2 are first class, Rows 3, 4 and 5 are Business class, and the rest are economy class. Your program should be a menu driven program and should contain the following functions 1. a. A function to read in from a file the current seating status (i.e. which seats are available and which are taken, into an appropriate data structure A function that allows a customer select a desired seat, by specifying the ticket type they intend to purchase (first, business or economy class). Your funtion should output appropriate message if the seat is taken and offer the user the opportunity to make another choice. If there are no free seats in the specified class, it should output an appropriate message b. c. A function that lets the user see all available seats (print Function) d. A function to allow the user see all available window seats (A and G) e. A function to allow the user see all available aisle seats (C and D f. A function to allow the user switch seats to an empty one. Print the new seating arrangement to show this change ABC DEFG Row1 Row 2 x xx Row3 x x*x Row 4 x*x x Row5 x *X Row 6 xx Row 7 x *x x Row 8 x Row 9 x*x x Row 10xx X Row 11 xxX Indicates that the seat is available and x means that it is filled

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

Mastering Big Data Interview 751 Comprehensive Questions And Expert Answers

Authors: Mr Bhanu Pratap Mahato

1st Edition

B0CLNT3NVD, 979-8865047216

More Books

Students also viewed these Databases questions

Question

=+3 What does "random walk' mean?

Answered: 1 week ago

Question

Identify five strategies to prevent workplace bullying.

Answered: 1 week ago