//An instance of this class represents a College Student // //The state of this Student object includes this Student's: // name, course record, earned credits, grade points // //The functionality of this Student object includes: // constructor to create this new Student (with a given name) // accessors to query each individual field of the state // mutator to update the state with information on one added course // override of toString() to provide an image of the complete state // public class Student { //************************************************************************* //Instance Variables - current state of this Student //************************************************************************* //Constructor: // Initializes this new Student object // @parameter name: the name for this new Student object public Student(String name) { } //************************************************************************* //Accessors, one for each instance variable //************************************************************************* //Mutator: updates the state of this Student object with a new course // @parameter number: the course number of this Student's added course // @parameter credits: the # of credits for this Student's added course // @parameter grade: the letter grade for this Student's added course public void addCourse(String number, int credits, char grade) { } //Helper Method: returns the grade points for a given letter grade // @parameter letter: a letter grade for which the grad points are returned // @exception: RuntimeException if letter is not 'A', 'B', 'C', 'D', or 'F' private static int gradePoints(char letter) { return "FDCBA".indexOf(letter); } //************************************************************************* //Override: returns a printable image of this Student object // The image provides a complete description of this Student's state /* Example: Georgie Porgy COP2210 (4) A ENC1101 (4) D MAC2311 (3) B 11 Earned Credits 29 Grade Points */ public String toString() { return super.toString(); } }