
import SimpleOutput;
import SimpleInput;
import InstructorNotifier1;

public class Terminal1 implements SchemeTesterInterface1 {

    public String[] getData () {
        String labNumber;
        String codeLocation;
        String specialTestLocation;
        String [] data = new String[3];
        SimpleOutput out = new SimpleOutput();
        SimpleInput in = new SimpleInput();
        out.println("Please enter the lab number of the lab you are submitting: ");
        labNumber = in.readString();
        out.println("Please enter the location of your lab code: ");
        codeLocation = in.readString();
        out.println("Please enter the location of any additional test cases: ");
        specialTestLocation = in.readString();
        data[0] = labNumber;
        data[1] = codeLocation;
        data[2] = specialTestLocation;
        return data;
    }//getData
    

    public void printResults(String results) {
        SimpleOutput out = new SimpleOutput();
        SimpleInput in = new SimpleInput();
        char answer;
        String addressee;
        String sender;
        String messageSubject;
        String comments;
        String messageBody;
        InstructorNotifier1 emailer = new InstructorNotifier1();
        out.print(results);
        out.println("Would you like to send the results to your instructor?(y/n) ");
        answer = in.readString();
        if ((answer == 'y' )||(answer == 'Y')) {
            out.println("What is your instructors email address? ");
            addressee = in.readString();
            out.println("What is your email address? ");
            sender = in.readString();
            out.println("What would you like the subject heading of the email to be? ");
            messageSubject = in.readString();
            out.println("Please type in any additional comments: ");
            comments = in.readString();
            messageBody = results + comments;
            emailer.sendEmail(addressee, sender, messageSubject, messageBody);
        } 
        else { System.exit(0);
        }
    }//printResults

}//Terminal1
            
