Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ : This program will allow the user to keep track of airline reservations. The program should display the seating chart for the airplane. It

C++ : This program will allow the user to keep track of airline reservations. The program should display the seating chart for the airplane. It will use an * to indicate a seat is taken and the # to indicate the seat is available. The program will also display a menu which provides the user with several options. There will be two types of seats in the airplane: first class and coach, each of which will have a different cost. The program must make use of files, arrays and functions.

The airplane will have 5 rows in the first class section with 4 seats in each row, 2 on each side of the aisle and 10 rows in the coach section with 3 seats on each side of the aisle. The prices for all the first class seats will be the same. The first 5 rows of coach will be more expensive than the last 5 rows. The prices for the seats will be stored in a file called SeatPrices.txt and the seat prices will appear in the file like so:

324.23 200.00 150.23

The program should read these values from the file and store the values in an array of doubles. This is an example of the seating chart:

1 2 3 4
Row 1 # # # #
Row 2 # # # #
Row 3 # # # #
Row 4 # # # #
Row 5 # # # #
1 2 3 4 5 6
Row 6 # # # # # #
Row 7 # # # # # #
Etc.

The menu will provide choices to reserve a seat(s) and display the total number of seats sold (indicating first class and coach), the total number of seats empty in a row, the total number of seats empty in the plane (indicating first class and coach), and the total amount of sales (in dollars).

Validation: The seat requested by the user is a valid row and seat number. The program should also make sure the seat is not already taken.

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

8th Edition

013460153X, 978-0134601533

More Books

Students also viewed these Databases questions

Question

1. How is the newspaper help to our daily life?

Answered: 1 week ago

Question

1. Prepare a short profile of Mikhail Zoshchenko ?

Answered: 1 week ago

Question

What is psychology disorder?

Answered: 1 week ago

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago