/** * Student class to represent an actual student. */ public class Student { //instance variables private String name; private int idNum; private double gpa; //suppose we have these variables with values in them private double costPerCredit; private int numCredits; //Constructors public Student(String inName, int inID, double inGPA) { name = inName; idNum = inID; gpa = inGPA; } //get methods public String getName() { return name; } public int getID() { return idNum; } public double getGPA() { return gpa; } //method for changing name public void changeName(String newName) { name = newName; } //method for changing gpa public void updateGPA(double newGPA) { gpa = newGPA; } //method to calculate the total cost of credits public double getEducationCost() { return costPerCredit * numCredits; } }