A theatre seating chart is implemented as a two-dimensional array of ticket prices, like this: AISLE ROW
Question:
A theatre seating chart is implemented as a two-dimensional array of ticket prices, like this:
AISLE
ROW 1 2 3 4 5 6 7 8 9 10
--------------------------------------------------------------------------------------------------------------
10 10 10 10 10 10 10 10 10 10 10
9 10 10 10 10 10 10 10 10 10 10
8 10 10 10 10 10 10 10 10 10 10
7 10 10 20 20 20 20 20 20 10 10
6 10 10 20 20 20 20 20 20 10 10
5 10 10 20 20 20 20 20 20 10 10
4 20 20 30 30 40 40 30 30 20 20
3 20 30 30 40 50 50 40 30 30 20
2 30 40 50 50 50 50 50 50 40 30
1 30 40 50 50 50 50 50 50 40 30
Write a program that prompts users to pick either a seat or a price. Mark sold seats by changing the price to 0. When a user specifies a seat, make sure it is available. When a user specifies a price, find any seat with that price starting at the front and working to the back of the theatre. Make sure you write your program using well defined functions.
You are to hand in:
Source code (well documented)
Input file (if used)
Sample tests for valid and invalid choices
Hierarchy Chart
User Guide
Statistics The Art and Science of Learning from Data
ISBN: 978-0321997838
4th edition
Authors: Alan Agresti, Christine A. Franklin, Bernhard Klingenberg