/** * Write a description of class Lab4 here. * * @Hunter Lloyd * @Feb 7, 2005 */ public class Lab3 { public static void main(String [] args) { //Constructor calls - you write the constructors Student stud1 = new Student("Mary"); Student stud2 = new Student("John"); Student perfect = new Student(); //set the test scores for each student stud1.setTestScores(78, 99); stud2.setTestScores(85, 95); /* The following code will get the average of the test score for stud2 and then print out the results with the name */ double average = stud2.getAverage(); System.out.println(stud2.getName() + " average = " + average); /* This prints the name, both test scores and the average, to get the average you should call the same method you used above, but this time you will call it from within the class. you will call it from inside the print method. */ stud1.print(); stud2.print(); perfect.print(); //Compute the average of all and then print it out. double total = (stud1.getAverage() + stud2.getAverage() + perfect.getAverage())/3; System.out.println("The average on all the test = " + total); } }