Answered step by step
Verified Expert Solution
Question
1 Approved Answer
There are examples but none of them show how to read the numbers from an input file I am stuck on the menu functions. I
There are examples but none of them show how to read the numbers from an input file
I am stuck on the menu functions.
I am doing this program in c++
View current seats with the - and *
Refunding ticket
Saving the data file
These are the numbers from ticket.txt file 4 3
5 19
6 16
11 30
9 29
15 26
10 29
7 18
13 25
3 12
9 2
4 11
10 24
5 23
13 10
15 5
12 19
11 17
5 24
5 23
8 19
14 27
5 18
6 22
13 27
1 15
5 21
15 8
4 28
8 23
11 4
2 12
4 7
6 28
15 21
9 18
4 3
6 15
2 19
4 11
11 11
3 1
2 14
8 8
13 12
4 13
9 11
14 27
10 11
15 24
Verizon 2:25 PM CSCI 3000 Homework 2.docx Write a program that can be used by a small theater to sell tickets for performances. The theater's auditorium has 15 rows of seats, with 30 seats in each row. The program should display a screen that shows which seats are available and which are taken. For example, the following screen shows a chart depicting each seat in the theater. Seats that are taken are represented by a # symbol, and seats that are available are represented by a symbol: You will read the input file "tickets.txt" to read the initial condition of the theater. In the file, cach line will represent one seat by a row and column number. For instance, if the file content is as follows: 10 15 5 20 8 13 This means three tickets were sold. And the seat location of the first ticket is 10t row and 15h column. The location of the second seat is 5th row and 20th column. And the location of the third seat is 8th row and 13th column. Your program starts with showing a menu to the user. In the menu there will be 5 options as follows: 1. View Current Seats a. This menu will show the current seat conditions as shown in the above figure. 2. Sell Ticket a. Program will ask user the row and column number of the seat. And will mark that seat as sold. (Also, provide a warning message if the seat was already sold) 3. Refund Ticket a. It will ask user to enter row and column number. If the seat was sold, it will mark it unsold. (Also, provide a EOpen With PrintStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started