Student: extends Person
- numStudents: static int
- studentlD: int / generated
- coursesTaken: Course[] //initialize to length of 50
- numCoursestaken: int //controlled variable
- isGraduate: boolean
- major: String // "undeclared" default value
+ Student() 1// coursesTaken = D, numCourses Taken =0, is , adaduate = false
+ Student(boolean isGraduate)
+ Student(String major, boolean isGraduate)
+ Student(String name, int birthYear, String major, boolean isGraduate)
+ isGraduate() boolean
+ getNumCoursesTaken() int
+ static getNumStudents(): int
+ getStudentID(): int
+ getMajor(): String
+ setlsGraduate(boolean isGraduate) void
+ setMajor(String major) void
+ addCourseTaken(Course course): void //appends course to the end of the existing array
+ addCoursesTaken(Course [] course) void //appends courses to the end of the existing array
+ getCourseTaken(int index): Course // note: index must be verified. Return "null" if invalid
+ getCourseTakenAsString(int index): String // note: index must be verified. Return " if" invalid // returns "courseDept-courseNum"
+ getAllCoursesTakenAsString0): String // comma separated list of all courses taught // uses getCourseTakenAsString(int index) as a helper method
+ equals(Object obj): boolean //all attributes inherited +local must match for 2 Student objects to be considered equal
+ toString0: String // Student: studentiD: %04d ∣ Major %20 s ∣%14 s∣ Number of Courses Taken: %3d | Courses Taken: %s", studentiD, major, Graduate/Undergraduate, numCoursestaken, getAllCoursestakenAsString()
+ compareTo(Person p) int /luse the Comparable interface specification, sort by numCredits