This project promotes the following Student Learning Outcomes:
Write a program to assign seating for performances at a small theater. The theater has 15 rows with 10 seats in each row. The program will need to display a screen that shows all 150 seats. Seats that are available will be represented by 'A'. Seats that are sold will be represented by S.
There are 3 performances scheduled for a particular show. The program will begin by prompting the user for the performance number (1, 2, 3). There are 3 files which contain the current pricing for the specified performance. If the user enters '1', then a file named prices1.txt will be used to show the current theater seating prices for performance # 1. If the user enters 2, then a file named prices2.txt will be used to show the current theater seating prices for performance # 2. If the user enters 3, then a file named prices3.txt will be used to show the current theater prices for performance # 3. If the user enters any other character a message will be displayed "Invalid entry - Select your performance (1, 2, or 3):", and allow the user to re-enter the performance number. Do not alter the prices text files that I have provided.
In addition to those situations displayed below in the test run, do not accept row or seat numbers that do not exist. Do not accept seats that have been sold.
Your program must contain the following items:
Select your performance (1, 2, or 3): 4
Invalid entry - Select your performance (1, 2, or 3): 3
Loading Prices for performance
Ticket Prices By Row
Row Price
--- -----
1 40.00
2 40.00
3 40.00
4 40.00
5 40.00
6 30.00
7 30.00
8 30.00
9 30.00
10 30.00
11 20.00
12 20.00
13 20.00
14 20.00
15 20.00
Press c to continue and then press return: c
CSC121 Theatre
1. View Available Seats
2. View Seating Prices
3. View Ticket Sales
4. Purchase a Ticket
5. Exit the Program
Enter your choice(1-5): 1
Seats
12345678910
Row 1 AAAAAAAAAA
Row 2 AAAAAAAAAA
Row 3 AAAAAAAAAA
Row 4 AAAAAAAAAA
Row 5 AAAAAAAAAA
Row 6 AAAAAAAAAA
Row 7 AAAAAAAAAA
Row 8 AAAAAAAAAA
Row 9 AAAAAAAAAA
Row 10 AAAAAAAAAA
Row 11 AAAAAAAAAA
Row 12 AAAAAAAAAA
Row 13 AAAAAAAAAA
Row 14 AAAAAAAAAA
Row 15 AAAAAAAAAA
Legend: S = Sold
A = Available
Press c to continue and then press return: c
CSC121 Theatre
1. View Available Seats
2. View Seating Prices
3. View Ticket Sales
4. Purchase a Ticket
5. Exit the Program
Enter your choice(1-5): 4
C++ Theatre
Ticket Purchase Opportunity
Do you wish to view the chart of available seats
before making your selections (y/n)? n
Please enter desired row number (1-15): 1
Please enter desired seat number (1-10): 1
Purchase confirmed
Would you like to purchase another seat (y/n)? y
Please enter desired row number (1-15): 1
Please enter desired seat number (1-10): 2
Purchase confirmed
Would you like to purchase another seat (y/n)? Y
Please enter desired row number (1-15): 12
Please enter desired seat number (1-10): 10
Purchase confirmed
Please enter desired row number (1-15): 1
Please enter desired seat number (1-10): 2
Sorry. That seat has been sold.
Would you like to purchase another seat (y/n)? Y
Please enter desired row number (1-15): 12
Please enter desired seat number (1-10): 9
Purchase confirmed
Would you like to purchase another seat (y/n)? n
You have purchased a total of 4 tickets for a total price of $120.00
CSC121 Theatre
1. View Available Seats
2. View Seating Prices
3. View Ticket Sales
4. Purchase a Ticket
5. Exit the Program
Enter your choice(1-5): 1
Seats
12345678910
Row 1 SSAAAAAAAA
Row 2 AAAAAAAAAA
Row 3 AAAAAAAAAA
Row 4 AAAAAAAAAA
Row 5 AAAAAAAAAA
Row 6 AAAAAAAAAA
Row 7 AAAAAAAAAA
Row 8 AAAAAAAAAA
Row 9 AAAAAAAAAA
Row 10 AAAAAAAAAA
Row 11 AAAAAAAAAA
Row 12 AAAAAAAASS
Row 13 AAAAAAAAAA
Row 14 AAAAAAAAAA
Row 15 AAAAAAAAAA
Legend: S = Sold
A = Available
Press c to continue and then press return: c
CSC121 Theatre
1. View Available Seats
2. View Seating Prices
3. View Ticket Sales
4. Purchase a Ticket
5. Exit the Program
Enter your choice(1-5): 4
C++ Theatre
Ticket Purchase Opportunity
Do you wish to view the chart of available seats
before making your selections (y/n)? n
Please enter desired row number (1-15): 10
Please enter desired seat number (1-10): 4
Purchase confirmed
Would you like to purchase another seat (y/n)? y
Please enter desired row number (1-15): 10
Please enter desired seat number (1-10): 5
Purchase confirmed
Would you like to purchase another seat (y/n)? n
You have purchased a total of 2 tickets for a total price of $60.00
CSC121 Theatre
1. View Available Seats
2. View Seating Prices
3. View Ticket Sales
4. Purchase a Ticket
5. Exit the Program
Enter your choice(1-5): 1
Seats
12345678910
Row 1 SSAAAAAAAA
Row 2 AAAAAAAAAA
Row 3 AAAAAAAAAA
Row 4 AAAAAAAAAA
Row 5 AAAAAAAAAA
Row 6 AAAAAAAAAA
Row 7 AAAAAAAAAA
Row 8 AAAAAAAAAA
Row 9 AAAAAAAAAA
Row 10 AAASSAAAAA
Row 11 AAAAAAAAAA
Row 12 AAAAAAAASS
Row 13 AAAAAAAAAA
Row 14 AAAAAAAAAA
Row 15 AAAAAAAAAA
Legend: S = Sold
A = Available
Press c to continue and then press return: c
CSC121 Theatre
1. View Available Seats
2. View Seating Prices
3. View Ticket Sales
4. Purchase a Ticket
5. Exit the Program
Enter your choice(1-5): 3
Total Sales to Date: $180.00
CSC121 Theatre
1. View Available Seats
2. View Seating Prices
3. View Ticket Sales
4. Purchase a Ticket
5. Exit the Program
Enter your choice(1-5): 7
Choice must be between 1 and 5. Please re-enter: 5