// Approach 1:  Testing Shell

/**
 * The OutputFormatter object will format output from the Comparison Checker 
 * object and from the Instructor Notification Object.
 *
 */

public class OutputFormatter1 { 
    
    SimpleOutput simpOut;
    String results;
    int correctnessLevel;
    SchemeTesterInterface1 outTarget;

    public OutputFormatter1 (SchemeTesterInterface1 target, int correctness) {
        outTarget = target;
        correctnessLevel = correctness;
        results = "desired correctness level:  " + correctnessLevel ;
        simpOut = new SimpleOutput ();
    }

    public void getTest (int testNumber, String testCase) {
        simpOut.println ("OutputFormatter1::getTest called with parameters:");
        simpOut.println ("     test number:  " + testNumber);
        simpOut.println ("     test case:  " + testCase);
        if (testCase.compareTo("done") == 0) {
            outTarget.printResults(results);
        }
        else {
            results += "test case " + testNumber + "\n" + testCase;
        }

    }

    public void getComp (boolean passed, String aResults, String uResults) {
        simpOut.println ("OutputFormatter1::getComp called with parameters:");
        simpOut.println ("     test passed:  " + passed);
        simpOut.println ("     authority results:  " + aResults);
        simpOut.println ("     user results:  " + uResults);
        results += "test passed:  " + passed
                   + "\n     authority results:  " + aResults
                   + "\n     user results:  " + uResults + "\n\n";
    }
        

} // OutputFormatter1
