Lab 12

Due 1:30PM April 30, 2007

  1. Design and implement a class Course that contains information about a course taken at a school (for example, the course number, name, and instructor). Provide appropriate accessor and modifier methods for the Course class. Next, implement a class Student that contains the name of a student, the user login for the student, and up to four courses for which the student is registered. The Student constructor should take the first and last name of the student and use the LoginGenerator class to generate the Student's user login. Implement a method that takes as input a String representing the name of an instructor and returns true if the student is taking a course taught by the instructor represented by the String input and false otherwise. Make sure to provide any other appropriate accessor and modifier methods for the Student class.
  2. Modify your Student class to keep an array of courses. Provide a method that takes as input a course name and returns true if the Student is taking the course represented by the name and false otherwise.
  3. Modify your Student class to use an ArrayList for the courses rather than an array.


Sami Rollins