package users; import java.util.ArrayList; import questions.*; import tests.*; /** * @author bnaftali * */ public abstract class User { /** * List of courses assigned to a user. */ public ArrayList courses; /** * History of a user's actions. */ private History log; // /** * List of Tests taken by a user. */ private ArrayList taken; /** * Default Constructor */ public User() { } /** * @return List of tests a user still needs to take. */ public ArrayList toTake() { return null; } /** * Adds a course to a user. */ public void addCourse() { } /** * @param del - Course to delete from a user's courses. pre: // // User does not already contain a course // with the same name as the one being added.. // (! exists (Course add ; us.contains(old) ; old.name.equals(add.name))) // The identifier us is nowhere defined. */ public void removeCourse(Course del) { } /* SPEST ISSUE: Another extra couple errors after the undefined id us is found: Invalid id: us at line: 54 at character: 10 found: . expecting: at line: 54 at character: 13 found: ; expecting: at line: 54 at character: 28 */ /** * @param take - Test that the user will take. */ public abstract void takeTest(Test take); /** * @param rev - test that the user will review. pre: // // Test being reviewed has already been taken. // Note: talking about a 'TestAttempt' class implementation // // (! exits (rev.attempt ;) // This logic is off the mark. What you're trying to say is that the // imput test rev has been attempted, but it's not clear in your model // how you'd state that. To be sure, (! exists (rev.attempt) doesn't // work since there's no instance variable named attempt in the Test // class, and the only relationship between a Test and a TestAttempt is // in the takeTest method, however it's not clear how this method // makes the connection between a Test and a TestAttempt, such that // given the Test you can determine that it's been taken, i.e., that // that there's a TestAttempt for it. * */ public abstract void reviewTest(Test rev); }