Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-Make a C++ theatre booking program for the employee on the counter to operate. - The program will be menu based. - The menu needs

-Make a C++ theatre booking program for the employee on the counter to operate.

- The program will be menu based.

- The menu needs to be like the following:

The pricing is $30 for full price, discount price is $20.

Available show: Captain Marvel

1.New Show.

2.End Show.

3.Purchase tickets.

4.Show available seats.

5.Show income for last show.

6.Settings

7.End program

Theatre hall layout must be like this:

15 rows by 30 columns

012345678901234567890123456789

Row 1 ******************************

Row 2 ****************##************

Row 3 ******************************

Row 4 ******************************

Row 5 **####************************

Row 6 ******###*XXXXXXXXXX**********

Row 7 **********XXXXXXXXXX**********

Row 8 **********XXXXXXXXXX**********

Row 9 *********#######**************

Row 10 ******************************

Row 11 ******************************

Row 12 ******************************

Row 13 *******************#######****

Row 14 ******************************

Row 15 ******************************

1. New Show must be made so its possible to edit the show name and all seats are reset and ready for new booking. It has to be possible to edit the pricing, name etc.

2. End Show will make the current setup show end, where user must be prompted and confirm to delete the current show.

3. Purchase tickets gives the user to choose the row and the column of the theatre hall. The program askes for confirmation of the booking to those seats.

4. Show available seats gives the user an overview of the theatre hall layout where the user can see which seat is available and which is already reserved/not available.

5. Show income will show the total current show income of the tickets and the income per row.

6. Settings, give the user ability to change the layout of the theatre hall, be able to make the user enter his/her name and password to login to the theatre program, passwords should be stored in a own binary file.

7. End Program. Ends the program when user selects this. But when the user starts the program again. Everything is saved in a file with the current theatre hall, running show and booked/reserved tickets.

Show the C++ code for the theatre hall, show the code for the file to be able to save data in it aswell as the binary file to be able to store passwords.

TIPS: Use a 2-dimensional char-array in order to maintain seat status. Do not zero terminate the rows. Use functions with very basic tasks. Use parametertransfer and use lowest possible variables.

Show how this can be done in Visual studio or similar programming enviroment .

EDIT the X is represents N/A seat. The "*" represents available seat and the "#" represents taken/reserved seat in the theatre hall layout.

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

Logidata+ Deductive Databases With Complex Objects Lncs 701

Authors: Paolo Atzeni

1st Edition

354056974X, 978-3540569749

More Books

Students also viewed these Databases questions

Question

RP-1 How did the humanistic theories provide a fresh perspective?

Answered: 1 week ago