(Solved) : Write Program Used Small Theater Sell Tickets Performances Program Display Screen Shows Se Q42747210 . . .

Can you help us!! Thank you!
Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen thaWhen the user selects the request tick user selects the request tickets menu option, the program nber of seats the patron wan#include<iostream> #include<fstream> using namespace std; const int COLS - 30; const int ROWS - 15; void displaySesting(char[rowPrices[1] - rowBasePrice + rowBasePrice (rowPriceMultiplier 1)) Ifstrean 1File; 1File.open(SeatAvailability.txt); if (1F
C++Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen that shows which seats are available and which are taken. Here is a list of tasks this program must perform • The theater’s auditorium has 15 rows, with 30 seats in each row. A two dimensional array can be used to represent the seats. The seats array can be initialized with # which means all seats are available. • The prices for each row can be stored in a separate array. All seats in given row are the same price, but different rows have different prices. • The program should display a menu includes options to o Display the seating chart: o View the ticket price for each row o Purchase ticket o View ticket sales report (total price for ticket purchased) o Exit the program . When the user selects the display seats menu option, the seats chart similar to the one shown below should be displayed. It should indicate which seats are already sold (*) and which are still available for purchase (#). Seals 123456789012345678901234567890 ***### # ### ** *** # ### ## #RESOR REBRERO # ## ## # ## Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8 Rowa Row 10 Row 11 Row 12 Row 13 Row 14 Row 15 #### ## ### ## ## ##### # ***** ****** **** # FERRETER ## # # ## ## # #### When the user selects the request tick user selects the request tickets menu option, the program nber of seats the patron wants. A function should then be co mation so that it can handle the ticket request. If any of in exist, or are not available, an appro are not available, an appropriate message should be display and are available, a bill should be printed that his per seat in the requested row, and the total price for the seats. Then should ask if the patron wishes to purchase these seats. the program should prompt for the then be called and passed this 1. If any of the requested seats do not uld be displayed. If the seats exist number of requested seats, the price e total price for the seats. Then the user program e, and how much money has been collected so the user selects the sales report menu option, a report that tells how many see e been sold, how many are still available, and how much money has been col Tar for the sold seats should be displayed. Think about how your team will either calcu collect and store this information so that it will be available when it is needed for the report. The seat availability information can be read in from the SeatAvailability.txt file you need to create your own file). This file contains 450 characters (15 rows with 30 chara each), indicating which seats have been sold (**) and which are available (*#’). Initially all seats are available. However, once the program runs and the file is updated, some o the seats will have been sold. When the day of ticket sales is over and the auit menu choice is selected, the program needs to be able to write the updated seat availability data back out to the file. #include<iostream> #include<fstream> using namespace std; const int COLS – 30; const int ROWS – 15; void displaySesting(char[][COLS], const int); double getRowPrice (double [], int); void requestTickets (char[][COLS], const int); void getSales Report(char() COLS], const int); void updateSesting(char[][COLS], const int); int main() { 15 char seating[ROWS][COLS]; double rowPrices[ROWS]; double rowBasePrice – 10.ee; double rowPriceMultiplier – 0.05; for (int 1 – 0; 1 < ROWS; I++) { rowPrices [1] – rolosePrice + rowsePrice (row PriceMultiplier – 1)); 0 % rowPrices[1] – rowBasePrice + rowBasePrice (rowPriceMultiplier 1)) Ifstrean 1File; 1File.open(“SeatAvailability.txt”); if (1File.fail()) cout << “There is no file called: SeatAvailability.txt in the source filen”; else { for (int 1-; 1 < ROWS; 1++) { for (int j – ®; j < COLS; j++) { 1File >> seating[103; 1File.close(); system(“pause”); return e; Show transcribed image text Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen that shows which seats are available and which are taken. Here is a list of tasks this program must perform • The theater’s auditorium has 15 rows, with 30 seats in each row. A two dimensional array can be used to represent the seats. The seats array can be initialized with # which means all seats are available. • The prices for each row can be stored in a separate array. All seats in given row are the same price, but different rows have different prices. • The program should display a menu includes options to o Display the seating chart: o View the ticket price for each row o Purchase ticket o View ticket sales report (total price for ticket purchased) o Exit the program . When the user selects the display seats menu option, the seats chart similar to the one shown below should be displayed. It should indicate which seats are already sold (*) and which are still available for purchase (#). Seals 123456789012345678901234567890 ***### # ### ** *** # ### ## #RESOR REBRERO # ## ## # ## Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 Row 7 Row 8 Rowa Row 10 Row 11 Row 12 Row 13 Row 14 Row 15 #### ## ### ## ## ##### # ***** ****** **** # FERRETER ## # # ## ## # ####
When the user selects the request tick user selects the request tickets menu option, the program nber of seats the patron wants. A function should then be co mation so that it can handle the ticket request. If any of in exist, or are not available, an appro are not available, an appropriate message should be display and are available, a bill should be printed that his per seat in the requested row, and the total price for the seats. Then should ask if the patron wishes to purchase these seats. the program should prompt for the then be called and passed this 1. If any of the requested seats do not uld be displayed. If the seats exist number of requested seats, the price e total price for the seats. Then the user program e, and how much money has been collected so the user selects the sales report menu option, a report that tells how many see e been sold, how many are still available, and how much money has been col Tar for the sold seats should be displayed. Think about how your team will either calcu collect and store this information so that it will be available when it is needed for the report. The seat availability information can be read in from the SeatAvailability.txt file you need to create your own file). This file contains 450 characters (15 rows with 30 chara each), indicating which seats have been sold (**) and which are available (*#’). Initially all seats are available. However, once the program runs and the file is updated, some o the seats will have been sold. When the day of ticket sales is over and the auit menu choice is selected, the program needs to be able to write the updated seat availability data back out to the file.
#include #include using namespace std; const int COLS – 30; const int ROWS – 15; void displaySesting(char[][COLS], const int); double getRowPrice (double [], int); void requestTickets (char[][COLS], const int); void getSales Report(char() COLS], const int); void updateSesting(char[][COLS], const int); int main() { 15 char seating[ROWS][COLS]; double rowPrices[ROWS]; double rowBasePrice – 10.ee; double rowPriceMultiplier – 0.05; for (int 1 – 0; 1

Expert Answer


Answer to Write a program that can be used by a small theater to sell tickets for performances. The program should display a scree…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?