java programming part1 implement a class named reservation that prompts users to pi 5192203

[Java programming] 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 for 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 the bottom row is the first row.

Part 2: Implement this part in a separate class named ReservationSimulator.

For the seating chart shown on previous page, simulate the process of reservations until all the seats are taken. The simulation will start with all seats available.

For each reservation iteration i, first randomly decide to choose a seat position or a price

Depending on the choice decision above, randomly choose a row and column or a price.

If the seat is already reserved, make another random choice until an unreserved seat is taken.

When a reservation is made, print the reservation id and reserved seat number.

Stop the simulation after all seats are taken.

Finally, print the seat chart that shows the reservation iteration number for each seat.

A sample output will be as following:

Reservation 1: Row=5, Column=4

Reservation 2: Row=1, Column=7

Reservation 3: Row=6, Column=3

….

Theater is full


"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now