Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to see the prices.dat data that will make this program run, i keep gettin

ID: 3647811 • Letter: I

Question

I need to see the prices.dat data that will make this program run, i keep getting that the prices.dat cannot be opened.

Step 1: The program should have a FUNCTION that displays a screen that shows which seats are available and which are taken. Seats that are taken should be represented by a # symbol and seats that are available should be represented by a * symbol. The first thing your program should do is initialize all of the seats to available (*) and display the seating chart. (HINT: The seating chart should be a two dimensional array.) Here is an example of the seating chart with all seats initialized to available.

Seats: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Row 0 * * * * * * * * * * * * * * * * * * * *
Row 1 * * * * * * * * * * * * * * * * * * * *
Row 2 * * * * * * * * * * * * * * * * * * * *
Row 3 * * * * * * * * * * * * * * * * * * * *
Row 4 * * * * * * * * * * * * * * * * * * * *
Row 5 * * * * * * * * * * * * * * * * * * * *
Row 6 * * * * * * * * * * * * * * * * * * * *
Row 7 * * * * * * * * * * * * * * * * * * * *
Row 8 * * * * * * * * * * * * * * * * * * * *
Row 9 * * * * * * * * * * * * * * * * * * * *
Row 10 * * * * * * * * * * * * * * * * * * * *
Row 11 * * * * * * * * * * * * * * * * * * * *
Row 12 * * * * * * * * * * * * * * * * * * * *
Row 13 * * * * * * * * * * * * * * * * * * * *
Row 14 * * * * * * * * * * * * * * * * * * * *

Step 2: Each row in the auditorium has a different ticket price. So tickets in row 0 may be 5.00 each and tickets in row 1 may be 10.00 each. Your program should have a FUNCTION that reads the ticket price of each row from an input file called prices.dat. The ticket price for each row should be stored in a one dimensional array.

Step 3: Your program should have variables tracking the total number of tickets sold and the total revenue for all tickets sold.


Step 4:
Your program should allow the user to sell tickets one at a time. The user should be able to sell as many tickets as they would like (you need a loop for this). Do this with some sort of prompt or menu asking the user if they would like to sell another ticket. Don

Explanation / Answer

//A program that asks the user for input to buy theater seats. #include #include using namespace std; //Function Declarations int Show_Menu (); //To show main menu void Show_Chart (); //To show seating chart const char FULL = '*'; //Seat taken const char EMPTY = '#'; //Seat open const int rows = 15; //Number of rows const int columns = 30; //Number of seats per row char map [rows][columns]; //Array to hold seating chart double price; int total = 0; int seat = 450; int seat2 = 0; int Quit = 1; int main () { const int Num_Rows = 15; int price [Num_Rows]; int row2, column2, cost; int answer; //Main Logo cout