Grades - " is " +...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
// **************************************************************** // Grades.java // // Use Student class to get test grades for two students // and compute averages // // **************************************************************** public class Grades { public static void main(String[] args) { Student student1 = new Student("Mary"); //create student2, "Mike" Student student2 = new Student("Mike"); //input grades for Mary student1.inputGrades(); //print the average for Mary System.out.println ("The average for " + student1.getName() +
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: " is " + student1.getAverage() + "."); System.out.println(); //input grades for Mike student2.inputGrades(); System.out.println(); //print the average for Mike System.out.println ("The average for " + student2.getName() + " is " + student2.getAverage() + "."); System.out.println(); //print the Student variables directly System.out.println ("Student 1: " + student1); System.out.println ("Student 2: " + student2); System.out.println(); } }...
View Full Document

Ask a homework question - tutors are online