// Approach 2:  Testing Shell

/** 
 * Comparison Checker class for Approach 2
 * This class compares two strings containing the
 * output of the Authority Program and User Program.
 *
 */

import OurSinglyLinkedList2;

public class ComparisonChecker2 {
    int callCount;
    SimpleOutput simpOut;

    public ComparisonChecker2 () {
        callCount = 0;
        simpOut = new SimpleOutput();
    }

    protected int[] statistics; // This array holds any future stats we wish
                                // to maintain between cases.

    public int compareResults(String authority, String user) {
        // 4 = isCharByChar
        // 3 = isLineAndOrder
        // 2 = isOrder
        // 1 = isNotOrder
        // 0 = None
        simpOut.println ("ComparisonChecker2::compareResults called with parameters:");
        simpOut.println ("     authority output:  " + authority);
        simpOut.println ("     user output:  " + user);
        callCount++;
        if (callCount == 2) {
            return 3;
        } else {
            return 4;
        }
    }

    public int[] getStatistics () {
        // This method returns the current statistics being kept on the cases.
        simpOut.println ("ComparisonChecker2::getStatistics called with no parameters:");

        return this.statistics;
    }

}
