I have a class called Seat as follows:
public class Seat {
private String seatType; // E for economy, B for business class
private boolean Available; // false:booked, true:available
public Seat (String seatType, boolean Available) {
this.seatType = seatType;
this.Available = Available;
}
public boolean getAvailability() {
return Available;
}
public String getSeatType() {
return seatType;
}
}
I would like to create an array called Seats with 10 elements where each of the elements is of type Seat as in the class above. I would like to initialize it with an assignment statement where each element is false for the seatType and 'E' as the seat type.
Can someone provide me with the assignment statement that will accomplish this?