/** * Student class to represent an actual student. */ public class Student { //instance variables private String name; private int idNum; private double gpa; private Course course1; private Course course2; //Constructors public Student(String inName, int inID, double inGPA) { name = inName; idNum = inID; gpa = inGPA; } //get methods public String getName() { //return "Foobar"; return name; } public int getID() { return idNum; } public double getGPA() { return gpa; //return 0.0; } //method for changing name public void changeName(String newName) { name = newName; } //method for changing gpa public void updateGPA(double newGPA) { gpa = newGPA; } public void addCourse1(Course c) { course1 = c; } public void addCourse2(Course c) { course2 = c; } public void printSchedule() { System.out.println(name + "'s first course is " + course1.getName()); System.out.println(name + "'s second course is " + course2.getName()); System.out.println(); } }