public class Verifier
{
    public static final String EXAMPLE_FILE = "example.txt";
    public static final int NUMBER_OF_BAGS = 4;

    public Verifier (boolean debug)
    {
        _debug = debug;
    }

    public final boolean verify ()
    {
        Rules theRules = new Rules(_debug);
        Inventory inv = theRules.parse(EXAMPLE_FILE);

        if (_debug)
            System.out.println("\nLoaded rules:\n\n"+inv);

        int count = inv.bagCount(LuggageProcessing.BAG_TYPE);

        if (count == NUMBER_OF_BAGS)
            return true;
        else
        {
            System.out.println("Invalid number of bags: "+count);

            return false;
        }
    }

    private boolean _debug;
}
@@ -51,24 +51,25 @@
 ring EXAMPLE
+1
 _FILE = %22exa
@@ -72,16 +72,17 @@
 %22example
+1
 .txt%22;%0A 
@@ -108,16 +108,25 @@
 nal int 
+EXAMPLE1_
 NUMBER_O
@@ -137,16 +137,20 @@
 GS = 4;%0A
+    
 %0A    pub
@@ -346,16 +346,17 @@
 (EXAMPLE
+1
 _FILE);%0A
@@ -495,24 +495,24 @@
 BAG_TYPE);%0A%0A
-
         if (
@@ -520,16 +520,25 @@
 ount == 
+EXAMPLE1_
 NUMBER_O

Update Verifier.java