package scholar; public class ScholarTester { public static void main(String[] args) { Scholar s1; Scholar s2; Scholar s3; System.out.println("This program was written by S. Robbins"); s1 = new Scholar("John D. Rockefeller", 3.45, 3, 95, false); s2 = new Scholar("Albert Einstein", 2.91, 4, 40, true); s3 = new Scholar("Voltare", 2.91, 4, 70, false); System.out.println("Part 1 tests follow:"); System.out.println("Student s1:"); System.out.println("Name " + s1.getFullName()); System.out.println("GPA: " + s1.getGradePointAverage()); System.out.println("essay: " + s1.getEssayScore()); System.out.println("hours: " + s1.getCreditHours()); System.out.println("science major: " + s1.isScienceMajor()); System.out.println("toString:\n" + s1); System.out.println("\nStudent s2:"); System.out.println("Name: " + s2.getFullName()); System.out.println("GPA: " + s2.getGradePointAverage()); System.out.println("essay: " + s2.getEssayScore()); System.out.println("hours: " + s2.getCreditHours()); System.out.println("science major: " + s2.isScienceMajor()); System.out.println("toString:\n" + s2); System.out.println("\nStudent s3:"); System.out.println("Name: " + s3.getFullName()); System.out.println("GPA: " + s3.getGradePointAverage()); System.out.println("essay: " + s3.getEssayScore()); System.out.println("hours: " + s3.getCreditHours()); System.out.println("science major: " + s3.isScienceMajor()); System.out.println("toString:\n" + s3); System.out.println("\nPart 2 tests follow:"); System.out.println("Score for s1 is " + s1.getScore()); System.out.println("Score for s2 is " + s2.getScore()); System.out.println("Score for s3 is " + s3.getScore()); System.out.println("\nPart 3 tests follow:"); System.out.println("Scores are: s1=" + s1.getScore() + ", s2=" + s2.getScore() + ", s3=" + s3.getScore()); System.out.println("s1.compareTo(s2) is " + s1.compareTo(s2)); System.out.println("s3.compareTo(s2) is " + s3.compareTo(s2)); System.out.println("s3.compareTo(s1) is " + s3.compareTo(s1)); System.out.println("\nPart 4 tests follow:"); System.out.println("Using the following scholars:"); System.out.println("s1: " + s1 + " with score " + s1.getScore()); System.out.println("s2: " + s2 + " with score " + s2.getScore()); System.out.println("s3: " + s3 + " with score " + s3.getScore()); System.out.println("Max of s1 and s2 is " + Scholar.max(s1, s2)); System.out.println("Max of s2 and s1 is " + Scholar.max(s2, s1)); System.out.println("Max of s2 and s3 is " + Scholar.max(s2, s3)); System.out.println("Max of s3 and s2 is " + Scholar.max(s3, s2)); System.out.println("Max of s1, s2, and s3 is \n" + Scholar.max(s1, s2, s3)); System.out.println("Max of s2, s3, and s1 is \n" + Scholar.max(s2, s3, s1)); System.out.println("Max of s3, s1, and s2 is \n" + Scholar.max(s3, s1, s2)); } }