public class Category
{
    public Category (String type, int r1, int r2, int r3, int r4, boolean debug)
    {
        _name = type;
        _r1 = r1;
        _r2 = r2;
        _r3 = r3;
        _r4 = r4;
        _debug = debug;
    }

    public boolean valid (int i)
    {
        if ((i >= _r1) && (i <= _r2))
            return true;

        if ((i >= _r3) && (i <= _r4))
            return true;

        return false;
    }

    public final String getType ()
    {
        return _name;
    }

    @Override
    public String toString ()
    {
        return "Category "+_name+": "+_r1+"-"+_r2+" or "+_r3+"-"+_r4;
    }

    @Override
    public boolean equals (Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;
        
        if (getClass() == obj.getClass())
        {
            Category temp = (Category) obj;

            return _name.equals(temp._name);
        }

        return false;
    }

    private String _name;
    private int _r1, _r2;
    private int _r3, _r4;
    private boolean _debug;
}
@@ -417,32 +417,374 @@
 n false;%0A    %7D%0A%0A
+    public boolean validTicket (Ticket t)%0A    %7B%0A        int count = 0;%0A        int%5B%5D values = t.values();%0A%0A        for (int i = 0; i %3C values.length; i++)%0A        %7B%0A            if (valid(values%5Bi%5D))%0A                count++;%0A        %7D%0A%0A        if (count == values.length)%0A            return true;%0A        else%0A            return false;%0A    %7D%0A%0A
     public final

Update Category.java