Question: Write the program in Java Student: extends Person numStudents: static int studentID: int coursesTaken: Course[] numCourses Taken: int is Graduate: boolean major:String Ilgenerated //initialize to

Write the program in Java

Student: extends Person numStudents: static int studentID: int coursesTaken: Course[] numCourses Taken:

Student: extends Person numStudents: static int studentID: int coursesTaken: Course[] numCourses Taken: int is Graduate: boolean major:String Ilgenerated //initialize to length of 50 //controlled variable //"undeclared" default value + Student() III courses Taken =[], numCourses Taken = 0, is Graduate = false Student(boolean isGraduate) +Student(String major, boolean isGraduate) + Student(String name, int birthYear, String major, boolean isGraduate) +isGraduate(): boolean + getNumCourses Taken(): int + static getNumStudents(): int +getStudentID(): int + getMajor(): String +setlsGraduate(boolean is Graduate): void + setMajor(String major):void +addCourseTaken(Course course): void +addCourses Taken(Course course): void +getCourse Taken(int index): Course + getCourse Taken AsString(int index): String +getAllCourses TakenAsString(): String method lappends course to the end of the existing array appends courses to the end of the existing array // note; index must be verified. Return "null" if invalid // note: index must be verified. Return" if invalid // returns "courseDept-courseNum" // comma separated list of all courses taught Il uses getCourse TakenAsString(int index) as a helper equals(Object obj): boolean //all attributes inherited+local must match for 2 Student objects to be considered equal + toString(): String Student: studentID: %04d | Major %20s | %14s| Number of Courses Taken: %3d | Courses Taken: %s", studentID, major, Graduate/Undergraduate, numCourses Taken, getAllCourses TakenAsString() compareTo(Person 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!