package csclasspkg;


public class ClassListTest {

   public static void main(String[] args) {
      ClassList classList =
           new ClassList("CS1713", 6);
      Student[] inputData = new Student[7];
      inputData[0] = new Student("John",   'A',"Doe",
                          "327333421","CS", 3.0,12);
      inputData[1] = new Student("Jane",   'B',"Deer",
                          "234345623","ENG",2.9,56);
      inputData[2] = new Student("Bill",   'C',"Clinton",
                          "345323432","BIO",3.2,98);
      inputData[3] = new Student("George", 'W',"Bush",
                          "743432342","BUS",2.5,66);
      inputData[4] = new Student("Barbara",'R',"Bush",
                          "312212122","EDU",3.5,72);
      inputData[5] = new Student("Michael",'X',"Jackson",
                          "123453237","MUS",2.1,87);
      inputData[6] = new Student("Russell",'M',"Crowe",
                          "743343445","CS", 3.2,3);

      for (int i = 0; i < inputData.length; i++) {
         boolean addCode =
            classList.addStudent(inputData[i]);
         if (addCode == false)
            System.out.println(inputData[i].getLastName() +
               " not added");
         else
            System.out.println(inputData[i].getLastName() +
               " added");
         classList.printList();
      }
      for (int i = inputData.length - 1; i >= 0; i--) {
         boolean dropCode =
            classList.dropStudent(inputData[i]);
         if (dropCode == false)
            System.out.println(inputData[i].getLastName() +
               " not found");
         else
            System.out.println(inputData[i].getLastName() +
               " dropped");
         classList.printList();
      }
   }
}