// Approach 2:  Testing Shell

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
import Coordinator2;
import InstructorNotifier2; 


//all comments that are for testing purposses and will be removed in the final version are marked with three /  i.e. "///"

public class GUI2 extends JFrame 
          implements ActionListener, SchemeTesterInterface2 {

    SimpleOutput out;

    public GUI2() {
        out = new SimpleOutput ();
        out.println ("GUI2::main called");
        out.println ("This is a simulated interface for testing purposes only.");

        Coordinator2 coord = new Coordinator2();
        String userprogram = "/home/walker/152/project.s01/test1.ss";
        double lab = 1;
        String specialFileName = "";

        try {
            coord.dostuff("Student User",  // username
                          1.0,  // lab number
                          "/home/walker/152/project.s01/test1.ss", // user program name
                          "", // special test file name
                          this);
        } catch (Exception e) {}
   } //GUI2

    public static void main(String[] arguments) {
        GUI2 gui = new GUI2();
   } //main

    public void printer(String results){
        out.println ("GUI2::printer called with parameter");
        out.println ("     results:" + results);

        try{
            out.println ("     formulating message of results with subject 'CSC 151 test'");
            SimpleInput in = new SimpleInput ();
            
            InstructorNotifier2 mailObj = new InstructorNotifier2 ();
            out.print ("Enter your e-mail address:  ");
            String emailAddress = in.readString();

            mailObj.notifyEmail("studentEmailAddress", "results were:\n" + results, emailAddress);
        }
        catch (Exception exc){}
    }

   // method included to make this an Action Listener
    public void actionPerformed(ActionEvent evt) {
    } //actionPerformed

}  //class
