package studentClient; import java.util.Calendar; import java.util.Collection; import java.util.Date; import test.Test; public abstract class StudentTestClient { enum ViewState { NOT_YET_VIEWED, VIEWED, COMPLETED } // Get the question the student is currently viewing. public abstract Question GetCurrentQuestion(); // Get the elapsed time since the test began. public abstract Date GetElapsedTime(); // Get the Questions that can be automatically graded. public abstract Collection GetAutomaticalllyGradableQuestions(); // Submits the test to the professor. public abstract void SubmitTest(); // Accessors. public abstract Test test(); public abstract String studentLogin(); public abstract String studentPassword(); public abstract Collection viewStates(); public abstract boolean hasBegun(); public abstract boolean hasSubmitted(); public abstract Date startTime(); // The test. private Test test_; // The student's credentials. private String studentLogin_; private String studentPassword_; // A collection of ViewStates, one for each Question. private Collection viewStates_; // Whether or not the student has yet agreed not to cheat and begun. private boolean hasBegun_; // Whether or not the student has submitted the test. private boolean hasSubmitted_; // Start time. private Date startTime_; }