import java.util.*;
import java.io.*;

public class Scanner
{
    public static final String DATA_FILE = "input.txt";

    public static void main (String[] args)
    {
        boolean verify = false;
        boolean debug = false;

        for (int i = 0; i < args.length; i++)
        {
            if ("-help".equals(args[i]))
            {
                System.out.println("Usage: [-debug] [-verify] [-help]");
                System.exit(0);
            }

            if ("-debug".equals(args[i]))
                debug = true;

            if ("-verify".equals(args[i]))
                verify = true;
        }

        if (verify)
        {
            Verifier v = new Verifier(debug);

            if (v.verify())
                System.out.println("Verified ok.");
            else
                System.out.println("Verify failed!");

            System.exit(0);
        }

        /*
         * Open the data file and read it in.
         */

        BufferedReader reader = null;
        Plane thePlane = new Plane(debug);

        try
        {
            reader = new BufferedReader(new FileReader(DATA_FILE));
            String line = null;

            while ((line = reader.readLine()) != null)
            {
                Barcode b = new Barcode(line, debug);

                if (debug)
                    System.out.println("Loaded: "+b);

                thePlane.addSeat(b.getSeat());
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }

        Vector<Seat> emptySeats = thePlane.emptySeats();
        Enumeration<Seat> iter = emptySeats.elements();

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

            System.out.println("Empty seat: "+s);
        }
    }
}
@@ -1804,16 +1804,67 @@
 ments();
+%0A        int row = -1;%0A        Seat theSeat = null;
 %0A%0A      
@@ -1944,24 +1944,51 @@
 Element();%0A%0A
+            if (debug)%0A    
             
@@ -2025,25 +2025,425 @@
 : %22+s);%0A
-        %7D
+%0A            /*%0A             * The seat will have a unique row as it's the last one%0A             * on the plane.%0A             */%0A%0A            if (s.row() == row)%0A            %7B%0A                row = -1;%0A                theSeat = null;%0A            %7D%0A            else%0A            %7B%0A                row = s.row();%0A                theSeat = s;%0A            %7D%0A        %7D%0A%0A        System.out.println(%22Seat: %22+theSeat);
 %0A    %7D%0A%7D

Update Scanner.java