StudentsContainer - // If a student is not in the list,...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
public abstract class StudentsContainer { // Implement ArrayType and LinkedListType extends this class / public abstract void makeList(String filename); // Read file whose filename is same as parameter 'filename'. // And make the list of all students. // You have to sort the list in the ascending order by their score. / public abstract boolean insertStudent(int ID, String name, double score); // Insert new student to the list. // If a student already exists, return false. // Else insert a new student to the list. / public abstract boolean deleteStudent(int ID); // Delete the student from the list whose ID equals to the parameter 'ID' // If the student is not in the list, return false. / public abstract boolean updateStudent(int ID, String name, double score); // Update the student's name and score who already exists in the list.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: // If a student is not in the list, return false. // Else update the name and score, then return true. / public abstract void printStudentList(boolean ascendingOrder); // Print all students' information in the list. // Because class StudentNode has its own toString() method, // Just print the StudentNode object in the list. // If a parameter 'ascendingOrder' is true, // Print the list in the ascending order by student's score. // If it is false, print the list in the descending order by student's score. / public abstract void statistics(); // Print the average and standard deviation of all students' score. // You're allowed to use Math.pow() and Math.sqrt() method. // Refer to the web page "http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Math.html" " }...
View Full Document

Ask a homework question - tutors are online