Objectives:
Problem: In preparation for the release of a new movie next summer, you have been hired by the owner of a very small movie theater to develop the backend for an online ticket reservation system. 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.
Classes
Base Node (Abstract)
TheaterSeat (derived)
Auditorium (not a derived class, same package)
Details
User Interface and Input: Present a user-friendly menu system for the user to select the auditorium. First ask for the auditorium:
1. Reserve Seats
2. Exit
Loop the menu until the user decides to quit. Imagine this is for a ticket kiosk in the lobby of the theater.
If the user wants to reserve seats, 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.
ABCDEFGHIJKLMNOPQRST
1 ...##..#####........
2 ########....####..##
3 .........##.........
4 #.#.#.#.#.#.#.#.#.#.
5 ########.#####.#####
The rows are numbered and the seats are identified in each row by a letter of the alphabet
After 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. Adult tickets will be reserved first, followed by child and then senior. All seats must be open for a reservation to be processed.
If the desired seats are not available, offer the user the best available seats that meet their criteria in the entire auditorium. The best available seats are the seats closest to the middle of the auditorium.
State to the user what the best available seats are and then ask if they would like those seats. Prompt the user to enter a Y to reserve the best available or N to refuse the best available. If the user declines the best available seats, return the user to the main menu. If the user accepts the best available seats, reserve them and display a confirmation to the screen. Once the selection has been processed, return to the main menu
When prompting the user for input, expect anything. Do not assume any input will be valid. If you ask for a number, the user could put in a floating point number, symbols or maybe even the Gettysburg Address (or at least a sentence or two). Make sure that the user selection does not go out of bounds of the auditorium. If invalid input is entered, loop until valid input is received.
User Interface Workflow: Please do not add extra prompts since this will cause a mismatch in the input which will either force the program to throw an exception or cause the program to perform an unintended operation.
Output: At the end of the program, write the current status of the auditorium back to the file. Remember to write the auditorium reservations using A, C and S to identify the type of ticket sold. Also, display a formatted report to the console. Make sure each column lines up properly (no jagged columns). Include the following information in the order given:
All values except total ticket sales will be an integer value. Total ticket sales will be a floating-point value rounded to 2 decimal places and formatted with a dollar sign before the first digit of the number.