import java.util.*;

public class TicketCheck
{
    public static final String DATA_FILE = "data.txt";

    public static final String FIELD = "departure";

    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);
        }

        Vector<Category> cats = Util.loadCategories(DATA_FILE, debug);
        Vector<Ticket> ticks = Util.loadTickets(DATA_FILE, debug);
        Vector<Ticket> validTickets = Util.validTickets(cats, ticks);

        if (debug)
        {
            for (int j = 0; j < validTickets.size(); j++)
                System.out.println(validTickets.elementAt(j));
        }

        Vector<Category> results = Util.order(validTickets, cats);

        
    }
}
@@ -1358,25 +1358,24 @@
  cats);%0A
-%0A
         
 %0A    %7D%0A%7D
@@ -1366,16 +1366,437 @@
         
+long value = 1;%0A        Ticket ownTicket = validTickets.elementAt(0);%0A%0A        System.out.println(%22Own ticket: %22+ownTicket);%0A%0A        for (int i = 0; i %3C results.size(); i++)%0A        %7B%0A            System.out.println(results.elementAt(i));%0A            %0A            if (results.elementAt(i).getType().startsWith(FIELD))%0A                value *= ownTicket.values()%5Bi%5D;%0A        %7D%0A%0A        System.out.println(%22Value: %22+value);
 %0A    %7D%0A%7D

Update TicketCheck.java