import java.util.*;

public class Plane
{
    public final int ROWS = 128;
    public final int COLUMNS = 8;

    public Plane (boolean debug)
    {
        _seats = new Seat[ROWS][COLUMNS];
        _debug = debug;

        for (int i = 0; i < ROWS; i++)
        {
            for (int j = 0; j < COLUMNS; j++)
                _seats[i][j] = null;
        }
    }

    public final void addSeat (Seat s)
    {
        _seats[s.getRow()][s.getColumn()] = s;
    }

    public final Seat getSeat (int row, int column)
    {
        return _seats[row][column];
    }

    public final Vector<Seat> emptySeats ()
    {
        Vector<Seat> blanks = new Vector<Seat>();

        for (int i = 0; i < ROWS; i++)
        {
            for (int j = 0; j < COLUMNS; j++)
            {
                if (_seats[i][j] == null)
                    blanks.add(new Seat(i, j));
            }
        }
        
        return blanks;
    }

    /*
     * It will have a unique row number as it's the last one in the plane (of valid seats).
     * 
     * assumes only one!
     */

    public final Seat emptySeat ()
    {
        Seat theSeat = null;
        int[] rows = new int[ROWS];

        for (int i = 0; i < ROWS; i++)
            rows[i] = 0;

        Vector<Seat> blanks = emptySeats();
        Enumeration<Seat> iter = blanks.getElements();

        while (iter.hasMoreElements())
        {
            Seat s = iter.nextElement();

            rows[s.getRow()]++;
        }

        for (int j = 0; j < ROWS; j++)
        {

        }

        return null;
    }

    private Seat[][] _seats;
    private boolean _debug;
}
@@ -1167,16 +1167,55 @@
 t%5BROWS%5D;
+%0A        Seat%5B%5D seats = new Seat%5BROWS%5D;
 %0A%0A      
@@ -1239,32 +1239,42 @@
  i %3C ROWS; i++)%0A
+        %7B%0A
             rows
@@ -1281,16 +1281,55 @@
 %5Bi%5D = 0;
+%0A            seats%5Bi%5D = null;%0A        %7D
 %0A%0A      
@@ -1410,12 +1410,9 @@
 nks.
-getE
+e
 leme
@@ -1542,16 +1542,51 @@
 w()%5D++;%0A
+            seats%5Bs.getRow()%5D = s;%0A
         
@@ -1637,16 +1637,78 @@
       %7B%0A
+            if (rows%5Bj%5D == 1)%0A                return seats%5Bj%5D;
 %0A       

Update Plane.java