import java.util.*;

public class Verifier
{
    public static final String EXAMPLE1 = "example1.txt";
    public static final int EXAMPLE1_PEOPLE = 3;
    public static final int EXAMPLE1_ANSWERS = 6;
    public static final int EXAMPLE1_GROUPS = 1;

    public static final String EXAMPLE2 = "example2.txt";
    public static final int EXAMPLE2_PEOPLE = 11;
    public static final int EXAMPLE2_ANSWERS = 11;
    public static final int EXAMPLE2_GROUPS = 5;
    
    public Verifier (boolean debug)
    {
        _debug = debug;
    }

    public final boolean verify ()
    {
        Parser p = new Parser(_debug);
        Vector<Answers> answers = p.work(EXAMPLE1);

        if (answers.size() == EXAMPLE1_GROUPS)
        {
            Answers a = answers.elementAt(0);

            if (a.numberOfPeopleInGroup() == EXAMPLE1_PEOPLE)
            {
                if (a.numberOfTrueAnswers() == EXAMPLE1_ANSWERS)
                {
                    answers = p.work(EXAMPLE2);

                    if (answers.size() == EXAMPLE2_GROUPS)
                    {
                        Enumeration<Answers> iter = answers.elements();
                        int count = 0;
                        int people = 0;

                        while (iter.hasMoreElements())
                        {
                            a = iter.nextElement();

                            count += a.numberOfTrueAnswers();
                            people += a.numberOfPeopleInGroup();
                        }

                        if (people == EXAMPLE2_PEOPLE)
                        {
                            if (count == EXAMPLE2_ANSWERS)
                                return true;
                            else
                                System.out.println("Wrong number of true answers in EXAMPLE2: "+count);
                        }
                        else
                            System.out.println("Wrong number of people in group in EXAMPLE2: "+people);
                    }
                    else
                        System.out.println("Wrong number of groups in EXAMPLE2: "+answers.size());
                }
                else
                    System.out.println("Wrong number of true answers in EXAMPLE1: "+a.numberOfTrueAnswers());
            }
            else
                System.out.println("Wrong number of people in group in EXAMPLE1: "+a.numberOfPeopleInGroup());
        }
        else
            System.out.println("Wrong number of groups in EXAMPLE1: "+answers.size());

        return false;
    }

    private boolean _debug;
}
@@ -76,17 +76,16 @@
  EXAMPLE
-1
  = %22exam
@@ -87,17 +87,16 @@
 %22example
-1
 .txt%22;%0A 
@@ -125,25 +125,24 @@
  int EXAMPLE
-1
 _PEOPLE = 3;
@@ -143,255 +143,47 @@
 E = 
-3;%0A    public static final int EXAMPLE1_ANSWERS = 6;%0A    public static final int EXAMPLE1_GROUPS = 1;%0A%0A    public static final String EXAMPLE2 = %22example2.txt%22;%0A    public static final int EXAMPLE2_PEOPLE = 11;%0A    public static final int EXAMPLE2
+11;%0A    public static final int EXAMPLE
 _ANS
@@ -189,18 +189,17 @@
 SWERS = 
-11
+6
 ;%0A    pu
@@ -223,25 +223,24 @@
  int EXAMPLE
-2
 _GROUPS = 5;
@@ -240,20 +240,16 @@
 PS = 5;%0A
-    
 %0A    pub
@@ -442,17 +442,16 @@
 (EXAMPLE
-1
 );%0A%0A    
@@ -483,17 +483,16 @@
  EXAMPLE
-1
 _GROUPS)
@@ -601,17 +601,16 @@
  EXAMPLE
-1
 _PEOPLE)
@@ -658,961 +658,109 @@
 erOf
-True
 Answers
-() == EXAMPLE1_ANSWERS)%0A                %7B%0A                    answers = p.work(EXAMPLE2);%0A%0A                    if (answers.size() == EXAMPLE2_GROUPS)%0A                    %7B%0A                        Enumeration%3CAnswers%3E iter = answers.elements();%0A                        int count = 0;%0A                        int people = 0;%0A%0A                        while (iter.hasMoreElements())%0A                        %7B%0A                            a = iter.nextElement();%0A%0A                            count += a.numberOfTrueAnswers();%0A                            people += a.numberOfPeopleInGroup();%0A                        %7D%0A%0A                        if (people == EXAMPLE2_PEOPLE)%0A                        %7B%0A                            if (count == EXAMPLE2_ANSWERS)%0A                                return true;%0A                            else%0A                                System.out.println(%22Wrong number of true answers in EXAMPLE2: %22+count);%0A        
+EveryoneAnsweredTrue() == EXAMPLE_ANSWERS)%0A                %7B%0A                    return true;%0A
     
@@ -785,32 +785,24 @@
             
-        
 else%0A       
@@ -810,32 +810,24 @@
             
- 
-       
 System.out.p
@@ -846,39 +846,36 @@
 g number of 
-people in group
+true answers
  in EXAMPLE2
@@ -877,312 +877,49 @@
 MPLE
-2
 : %22+
-people);%0A                    %7D%0A                    else%0A                        System.out.println(%22Wrong number of groups in EXAMPLE2: %22+answers.size());%0A                %7D%0A                else%0A                    System.out.println(%22Wrong number of true answers in EXAMPLE1: %22+a.numberOfTrueAnswers
+a.numberOfAnswersEveryoneAnsweredTrue
 ());
@@ -1024,25 +1024,24 @@
 p in EXAMPLE
-1
 : %22+a.number
@@ -1148,17 +1148,16 @@
  EXAMPLE
-1
 : %22+answ

Update Verifier.java