Question: in java, please do not include anything from application class i am also providing the seat class Airplane Class: An instance of the Airplane class

in java, please do not include anything from application class i am also providing the seat class  in java, please do not include anything from application class i
am also providing the seat class Airplane Class: An instance of the

Airplane Class: An instance of the Airplane class should store a reference to an array which stores references to soats on the plane and the number of seats in first class. The Airplane class should provide the following behaviors: A parameterized constructor that creates the array based upon the number of seats passed to it as well as the actual seats. All planes have a maximum of 40% of their seats Page 1 of 5 AAA BER designated as first class and the remaining 60% as coach class. For example, in a plane with 10 seats, there are 4 first class seats at the front of the plane) and 6 coach class seats (after the end of the first class). If there isn't an even split, the plane will have slightly less than 40% first class and slightly more than 60% coach class. For example, in a plane with 14 seats, 40% would be 5.6 seats. In order to avoid going over the 40% maximum, this plane would have 5 first class seats and 9 coach class seats. A method to determine and return the current capacity (ic, the percent of occupied seats) of a class of seat (first or coach), A method to assign a first class or coach class seat. As long as the class of seat requested is less than 50% capacity, the reservation can be completed. Since the airline wants to keeps its passengers as socially distant as possible you will have to come up with a strategy to assign seats in such a way that passengers are spaced out within their class of service. Each row in the plane only has 1 seat. A method to cancel a specific previously reserved first class or coach class seat. A toString method which returns a string containing the state of the Airplane, A savas elv Airplane Sealjava Blagojava Bingo Ballava 1 package projisp21; 2 3 public class Seat { 4 5 private String seatType; private boolean seatAvability: 7 private int seatNumber: 8 9 public Seat(String seatType, boolean seat Avability, int seatNumber) 10 this. seatType seat Type: 11 this.seatAvability = seotavability: 12 this.seatNumber seatNumber: 13 14 3 15 1 public String getSeatType() { 17 return seatType) 18 > 19 20 public boolean getSeatAvability 21 return seativability: 22 } 23 240 public int getSeatNumber() { 25 return seatNumber: 25 1 .z- java Javas Tavas 28 29 30 31 32 33 34 35 36 37 38 public void reserve Seat(String reservation) { if (seatAvability = true) reservation 2 new String("Seat Is reserved"); } else { reservation - new String"Seat is already reserved"); public void cance Reservation(String Reservation) { if (seatAvability = false) { seatAvability true ceservation = new String("Seat reservation is canceled"); else { cheservation = new String("Seat is not reserved"); > > public String toString() { String str "" return str "The seat number ist + seatNumber. seat Type + seatAvabili } 50 51 54 ) writable Smart mart 6911 TOUS DD DN FB F10 FO F11 F7 F12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!