CIS2168 - Homework 6: Ordered List and Grades

[Thank you Dr. Koffman]

Handed out: 10/05/10
Due: by 10pm on 10/11/10

Use the generic class OrderedList, i.e. a single linked list where nodes are ordered in increasing order of their data. Of course we assume that the generic element type is an extension of Comparable. Here is an implementation of this class.

Write a class Student that stores a persons last name, first name, an ordered list of scores [increasing], an average score, and a letter grade. Provide methods for this class including constructors, toString, and methods equals and compareTo whose results are based on a student's name.

Write a class Gradebook that stores an instructors name, a section ID, a course name, and an OrderedList of Student records. Write the following methods for class Gradebook:
  1. Load the Gradebook object with data read from a text file and store the records in an ordered list that is ordered by student name. Put a sentinel score of -99 in the data file after the last score for each student. The students should not all have the same number of exam scores
  2. Write the Gradebook object to an output text file that can be used as a data file at a later time
  3. Write the Gradebook object to a binary output file
  4. Load a Gradebook of Student records with data read from a binary file
  5. Assign a letter grade to each student based on the students average exam score [define rules for conversion from numeric to letter grade]
  6. Remove the Student object specified by name from the Gradebook
  7. Undo the effect of a Remove student operation
  8. Remove the lowest exam score for each student and recalculate student averages and reassign letter grades
  9. Undo the effect of removal of lowest score
  10. Display the Gradebook object on the console

Write a menu-driven client program with a user interface. You can use a menu similar to the one shown on p. 657 of the textbook that is created by calling JOptionPane.showOptionDialog. Or you can use JMenu etc. You should have a menu button for each operation: two Loads, two Writes, two Removes, two UnDos [active only after an immediately preceding Remove], one Display, and of course Exit.