Question: In Java programming, implement a theater seating chart as a two-dimensional array of ticket prices, like this: {10, 10, 10, 10, 10, 10, 10, 10,
In Java programming, implement a theater seating chart 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} Write a program that help users to pick either a seat or a price. Mark sold seats by changing the price to 0. Whena user species a seat, make sure it is available. When a user species a price, nd any seat with that price. Named the class as Theater and use the followings in the class: Private seatsPrices: [9][10] Public checkAvailabilityOfSeat(int x, int y): boolean Public reserveSeat (int x, int y): void Public findTheFirstAvailablePlaceAccordingToPrice(int price): int[2]
For the driver code outcome should be as below:

***********MENU ************* Press: 1 To choose your place according to seat coordinates 2 to choose your place according to price Where do you want to sit? Write coordinates please. 2 1 I The place is reserved at 2.1 Is there anyone who would you like to get a ticket?(Y/N) Y ***********MENU************* Press: 1 To choose your place according to seat coordinates 2 To choose your place according to price WELCOME Please enter the price of the seat that do you want to sit. 30 The place is reserved 6,2 Is there anyone who would you like to get a ticket? (Y/N) ***********MENU************* Press: 1 To choose your place according to seat coordinates 2 to choose your place according to price
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
