Question: In Java, Below is the project, if you can make the seat class and add some comments about what is happening will be great. I
In Java, Below is the project, if you can make the seat class and add some comments about what is happening will be great. I just started to learn how to code so if can make t simple will be much appreciated. Thanks
A small airline has decided to create a new automated system for reservations. You have been hired to write the program for this system. Customers will be allowed to book a reservation, cancel an existing reservation and request a seating chart. The airline has several planes, each with a different number of seats but all planes only have 1 seat per row. Due to COVID the airline is advertising that passengers in each class of service (first and coach) will be capped at 50% capacity and passengers will be assigned seats to ensure social distancing.
Seat Class: An instance of the Seat class should store the type of seat (first or coach), whether the seat is empty or occupied, and the seat number. The Seat class should provide the following behaviors:
A parameterized constructor the constructor will accept values for the seat number and the type of seat and store this information appropriately. Initially, the seat should be marked as empty.
Accessor methods for the seat type, seat number and whether or not it is empty/occupied.
A method to reserve a seat.
A method to cancel a reservation.
A toString method which returns a string containing the seat number, type and whether or not it is occupied.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
