/*
 * file: SRTest2:java
 * Class tests the StudentRecord class.
 * Both records are exactly the same.
 * Include merge.
 */

public class SRTest2 {

   public static void main(String[] args) {
   
      StudentRecord oneStudent = new StudentRecord("Smith", "Fred", "990223900");
      StudentRecord anotherStudent = new StudentRecord("Smith", "Fred", "990223900");
   
      oneStudent.setAssignments("87.5");
      oneStudent.setMidterm("64.0");
      oneStudent.setExam("72.5");
      anotherStudent.setAssignments("87.5");
      anotherStudent.setMidterm("64.0");
      anotherStudent.setExam("72.5");
      
      System.out.println(oneStudent);
      System.out.println(anotherStudent);

      if (oneStudent.sameStudent(anotherStudent)) {
   
         System.out.println("Same");      
         System.out.println(oneStudent.mergeRecords(anotherStudent));
      }
      else
      
         System.out.println("Different");
   }
}

