package studentDB; /** * Graduate Student class * A graduate student is a form of student, doing * a thesis. */ public class GraduateStudent extends Student { private String thesisTitle; /** * Creates a graduate student with no thesis title. */ public GraduateStudent () { thesisTitle = null; } /** * @param name The name of the graduate student * @param studentNumber The student number of the graduate student * @param thesisTitle The thesis title of the graduate student */ public GraduateStudent ( String name, int studentNumber, String thesisTitle) { super (name, studentNumber); this.thesisTitle = thesisTitle; } /** * @param thesisTitle The thesis title of the graduate student */ public void setThesisTitle (String thesisTitle) { this.thesisTitle = thesisTitle; } /** * @return The thesis title of the graduate student */ public String getThesisTitle () { return thesisTitle; } /** * Converts information about a graduate student into a string * form suitable for printing. * @return Information describing graduate student. */ public String toString () { return super.toString() + "; Thesis title: " + thesisTitle; } }