// ClassListTester.java
//
// This class tests the ClassList class

public class ClassListTester {

	public static void main(String[] args) {

		// make a new ClassList object

		ClassList myClass = new ClassList ();

		// test out the toString method

		System.out.println (myClass.toString());

		// add some guy to the list

		StudentGrade someGuy = new StudentGrade ("123abc", 95.0);
		myClass.addStudent(someGuy);
		
		// add a bunch more guys to the list

		StudentGrade someGuy1 = new StudentGrade ("124abc", 95.0);
		myClass.addStudent(someGuy1);
		StudentGrade someGuy2 = new StudentGrade ("125abc", 100.0);
		myClass.addStudent(someGuy2);
		StudentGrade someGuy3 = new StudentGrade ("126abc", 90.0);
		myClass.addStudent(someGuy3);
		StudentGrade someGuy4 = new StudentGrade ("127abc", 95.0);
		myClass.addStudent(someGuy4);
		StudentGrade someGuy6 = new StudentGrade ("128abc", 95.0);
		myClass.addStudent(someGuy6);
		StudentGrade someGuy7 = new StudentGrade ("129abc", 95.0);
		myClass.addStudent(someGuy7);
		StudentGrade someGuy8 = new StudentGrade ("1210abc", 85.0);
		myClass.addStudent(someGuy8);
		StudentGrade someGuy9 = new StudentGrade ("1211abc", 95.0);
		myClass.addStudent(someGuy9);
		StudentGrade someGuy10 = new StudentGrade ("1212abc", 65.0);
		myClass.addStudent(someGuy10);
		StudentGrade someGuy11 = new StudentGrade ("1213abc", 95.0);
		myClass.addStudent(someGuy11);

		// print out the list using the toString method

		System.out.println ("the new myClass: " + myClass.toString());

		// test the findGrade method

		System.out.println ("the grade for student 123abc is " 
				+ myClass.findGrade("123abc"));

		// test the changeGrade method

		if (myClass.changeGrade("123abc", 75.0)) {
			System.out.println ("student was found");
		} else {
			System.out.println ("student was NOT found!");
		}
		System.out.println ("after the change, the grade for student 123abc is " 
				+ myClass.findGrade("123abc"));
		
	}
}
