Question: Student: extends Person numStudents: static int studentID: int / / generated coursesTaken: Course [ ] / / initialize to length of 5 0 numCoursesTaken: int
Student: extends Person
numStudents: static int
studentID: int generated
coursesTaken: Courseinitialize to length of
numCoursesTaken: int controlled variable
isGraduate: boolean
major:String undeclared default value
Student coursesTaken numCoursesTaken isGraduate false
Studentboolean isGraduate
StudentString major, boolean isGraduate
StudentString name, int birthYear, String major, boolean isGraduate
isGraduate:boolean
getNumCoursesTaken: int
static getNumStudents: int
getStudentID: int
getMajor: String
setIsGraduateboolean isGraduate: void
setMajorString major:void
addCourseTakenCourse course: void appends course to the end of the existing array
addCoursesTakenCourse courses: void appends courses to the end of the existing array
getCourseTakenint index: Course note: index must be verified. Return null if invalid
getCourseTakenAsStringint index: String note: index must be verified. Return if invalid
returns courseDeptcourseNum
getAllCoursesTakenAsString: String comma separated list of all courses taught
uses getCourseTakenAsStringint index as a helper method
equalsObject obj: boolean all attributes inheritedlocal must match for Student objects to be considered equal
toString: String Student: studentID: d Major s s Number of Courses Taken: d Courses Taken: s studentID, major, GraduateUndergraduate numCoursesTaken, getAllCoursesTakenAsString
compareToPerson p: int use the Comparable interface specification, sort by numCredits
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
