Theater Seating Program - PRG/410 Computer Science Assignment

Verified

Added on  2019/09/25

|3
|532
|181
Homework Assignment
AI Summary
This assignment presents a solution for a theater seating program. The program is designed to track seat availability, handle ticket sales, and manage seating charts. The solution details input requirements, including the need to track show times and the number of tickets requested. Output requirements include displaying available seats and ticket counts, along with confirmation messages for purchases. The program utilizes arrays and loops for data management and output formatting. Furthermore, the assignment outlines various validation rules to ensure data integrity, such as validating ticket prices, seat selections, and user input formats. These rules prevent system errors and ensure the smooth functioning of the program. The program also includes features to track total revenue and tickets sold, updating these values with each successful transaction. The provided solution offers a comprehensive approach to developing a functional and robust theater seating management system.
Document Page
1
Theatre Seating Program
PRG/410
May 15, 2017
Jon Jensen
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
2
Theatre Seating Program
Input Requirements
The program will need to track what seats are being requested. Although not defined as a
requirement, it may make sense to track show times as well as the name of the show that is being
performed. This would allow tracking for multiple performances each day. When requesting a
new seat, the user would need to input the number of tickets desired, and either be suggested a
group of seats or allowed the option to choose specific seats (like R1 seat 5, R5 seats 2 - 5, or
similar). The program should track how many seats are taken and how many are available.
Output Requirements
As we look at the theater seating program the output requirements for the program will
require the program to keep track of the ticket sales and give a message of what seats are
available and how many tickets are left. To do this it will require the programmers to implement
arrays and loops that will keep track of this information. The arrays will keep track of the theater
seating and the loop will take care of the output messages of what seats are available, as well as
what sections they are available in. We can also implement an output message for those who
purchase tickets that will state, “Thank you for your purchase”, and “Enjoy the Show.”)
Validation Rules
Validation rules are needed for the new seat validation program to ensure the input
data is formatted correctly. For the new seat validation system those rules are but not limited to
the following:
Document Page
3
Ensure price enter is a float formatted number.
Ensure number of tickets is a whole number.
Ensure that seat requested is in proper Row number and column format.
Ensure choices for different home screen selections are formatted correctly.
Ensure selected seat is available. If the seat is taken the program should not let the
user sell the ticket. If this happens, print a message to the user saying the ticket is not
available. If the seat is available, the program should update the seating chart by
putting a taken symbol (#) in that seat’s position in the chart.
The program should then look up the row price for the seat sold. The program should
have a variable tracking the total revenue, the price of the seat sold should be added to
this total after each sale.
The program should have a variable tracking the total tickets sold. The next thing the
program should do when selling a ticket is update the total tickets sold.)
With these validation rules in place we can ensure that the system will not crash when
information is entered incorrectly. If information is entered in an incorrect format the system
should prompt the User to reenter information using the correct format.
.
chevron_up_icon
1 out of 3
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]