//******************************************************************** // GradStudent.java Lewis and Loftus // // Represents a graduate student, with financial support. //******************************************************************** class GradStudent extends Student { private String source; private double rate; //----------------------------------------------------------------- // Sets up the gradate student using the specified information. //----------------------------------------------------------------- public GradStudent (String name, int numCourses, String source, double rate) { super (name, numCourses); this.source = source; this.rate = rate; } //----------------------------------------------------------------- // Returns a description of this graduate student as a string. //----------------------------------------------------------------- public String toString () { String result = super.toString(); result += "\nSupport source: " + source + "\n"; result += "Hourly pay rate: " + rate; return result; } }