66.7k views
1 vote
Write a program that prompts users to pick either a seat or a price. Mark sold seats by changing the price to 0. Use overloaded methods to implement seat allocation: When a user specifies a seat (row, column), make sure it is available. When a user specifies a price, find any seat with that price. Write appropriate responses to the user if the seat is already taken, if their seat is available, or the seat number of the assigned seat if they just specified a price, etc.

A theater seating chart is implemented as a two-dimensional array of ticket prices, like this:_______.
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

User Jadli
by
4.8k points

2 Answers

1 vote

Answer:

i do not know

Step-by-step explanation:

User Riorio
by
4.7k points
4 votes

Answer:

Answer is given in the attached document.

Step-by-step explanation:

Explanation is given in the attached document.

Write a program that prompts users to pick either a seat or a price. Mark sold seats-example-1
User Vadakkumpadath
by
5.1k points