public class main {
public static void main(String[] args) {
//ARRAY for first class
seat[][] FC = new seat[4][3];
for(int i = 0; i < 5; i++)
for(int j = 0; j < 4; j++)
{
FC[i][j] = new seat();
}
//ARRAY for economy class
seat[][] EC = new seat[14][5];
for(int i = 0;i<14;i++)
for(int j = 0;j<5;j++) {
EC[i][j] = new seat();
}
ReserveEC(EC);
System.out.println(FC[0][3].getStatus());
}
//METHOD reserve FC
public static void ReserveFC(seat x[][], String a) {
String choice = a;
if (choice.equals("window")) {
for(int i=0;i<4;i++){
for(int j=0;j<3;j+=3) {
if( x[i][j].getStatus() == false) {
x[i][j].setStatus(true);
break;
}
}
if (choice.equals("aisle")) {
for(int k=0;k<4;k++){
for(int l=1;l<3;l++) {
if( x[k][l].getStatus() == false) {
x[k][l].setStatus(true);
break;
}
}
}
}
}
}
}
//
//METHOD reserve EC
public static void ReserveEC(seat x[][]) {
for(int i=0;i<14;i++){
for(int j=0;j<5;j++) {
if( x[i][j].getStatus() == false) {
x[i][j].setStatus(true);
break;
}
}
}
}
//
}