Home Work

P 9.2. Define a class Quiz that implements the Measureable interface. A quiz has a score and a letter grade (such as B+). Use the first implementation of the DataSet class to process a collection of quizzes. Display the average score and the quiz with the highest score (both the letter grade and score).

 

P 9.15: Look up the definition of the standard Comparable interface in the API documentation. Modify the DataSet class to accept Comparable objects. With this interface, it is no longer meaningful to compute the average. The DataSet class should record the minimum and maximum data value. Test your modified DataSet class by adding a number of String objects. (The String class implements the Comparable interface.)