Access over 20 million homework & study documents

search

A theater seating chart is implemented as a two dimensional array of

Content type
User Generated
Rating
Showing Page:
1/18
A theater-seating chart is implemented as a two-
dimensional array of ticket prices, as following.
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
10
20

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/18
20
20
20
20
20
10
10
10
10
20
20
20
20
20
20
10
10
10
10
20
20
20
20
20
20
10
10
20
20
30
30
40
40
30
30
20

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/18

Sign up to view the full document!

lock_open Sign Up
End of Preview - Want to read all 18 pages?
Access Now
Unformatted Attachment Preview
A theater-seating chart is implemented as a two dimensional array of ticket prices, as following. 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 20 20 30 30 40 40 30 30 20 20 20 30 30 40 50 50 40 30 30 20 30 40 50 50 50 50 50 50 40 30 Part1:Implement a class named Reservation that prompts users to pick either a seat or a price. For each reservation, display the seat chart where reserved seats are shown as 0. When a user specifies a seat, make sure it is available. If the seat is not available, print an error message. When a user specifies a price, find any available seat with that price. If there is not a seat available fo r that price, print an error message. Prompt users with their assigned seats and balance. Keep asking for more reservation until all seats are taken. Please note that users will enter 1 for the first row not 0. The leftmost column is the first column and t he bottom row is the first row. A sample dialogue is as following (user prompts, user input, output): Welcome, press 1 to enter a seat number, press 2 to enter a price:1 Please enter a seat number (row column):3 4 Thank you. Your reservation row:3, column:4 is completed. Your balance is $30 Do you want to make another reservation (y/n):y Welcome, press 1 to enter a seat number, press 2 to enter a price:2 Please enter ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
Excellent resource! Really helped me get the gist of things.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4