Objectives: Directly manipulate files using advanced file functions
Problem: In preparation for the release of Guardians of the Galaxy 2, you have been hired by the owner of a small movie theater to develop the backend for an online ticket reservation system. Patrons will be able to reserve seats in one of three auditoriums. Once the patron has selected an auditorium, the program should display the current seating arrangement and allow the patron to select seats. A report should be generated at the end of the program to specify for each individual auditorium and overall for all auditoriums how many seats were sold/unsold and how much money was earned.
Details
User Interface and Input: Present a user-friendly menu system for the user to reserve seats. First ask for the auditorium:
1. Reserve Seats
2. View Auditorium
3. Exit
Although in reality the user would likely only make one purchase, for testing purposes, assume the user will repeat the ticket buying process until they decide to quit.
After the user has selected a non-exit option, present the user with a menu to select the auditorium.
1. Auditorium 1
2. Auditorium 2
3. Auditorium 3
Once the auditorium has been selected, display the current seating availability for that auditorium. An example seating chart is provided below for an auditorium with 5 rows and 20 seats per row.
12345678901234567890
1 ...##..#####........
2 ########....####..##
3 .........##.........
4 #.#.#.#.#.#.#.#.#.#.
5 ########.#####.#####
The seats are numbered sequentially from left to right and only the ones digit is displayed above each column to make it easier to display the chart. It is understood that the second set of digits from 1-0 are for the numbers 11- 20 in the above example.
After the user has selected the auditorium and the seating chart has been displayed, prompt the user for the following information in the order below:
Assume that the user wants to reserve sequential seats to the right of the first seat entered.
Output: At the end of the program, display a formatted report to the console. The report should consist of 4 columns: