Question: With the below being the base code, design, code in Java, test and document ( at least ) the following classes a Student _ Course
With the below being the base code, design, code in Java, test and document at least the following classes
a StudentCourse class, a StudentResearch class both derived from the Student class
Assuming in this program, you allow multiple student objects to be created ie arraylist of student objects
For course work students StudentCourse class:
a Contain enrolment type.
b Provide a reportGrade method such that it will output Cto identify as course work student the Name first name and last name student number, the unit ID the overall mark, and the final grade of the student.
For research students StudentResearch class:
a Contain enrolment type.
b Provide a reportGrade method such that it will output Rto identify as research student the Name first name and last name student number, the overall mark, and the final grade of the student.
Student Class Code:
Base class Student
public class Student
Private attributes
private String firstName;
private String lastName;
private long studentID;
Constructor to initialize all fields
public StudentString firstName, String lastName, long studentID
this.firstName firstName;
this.lastName lastName;
this.studentID studentID;
Getter for first name
public String getFirstName
return firstName;
Setter for first name
public void setFirstNameString firstName
this.firstName firstName;
Getter for last name
public String getLastName
return lastName;
Setter for last name
public void setLastNameString lastName
this.lastName lastName;
Getter for student ID
public long getStudentID
return studentID;
Setter for student ID
public void setStudentIDlong studentID
this.studentID studentID;
Method to compare two students based on student ID
public boolean equalsStudent otherStudent
return this.studentID otherStudent.studentID;
Method to report grade prints a message, meant to be overridden in child classes
public void reportGrade
System.out.printlnThere is no grade here.";
Method to display student information
public void displayStudentInfo
System.out.printlnStudent Name: firstName lastName;
System.out.printlnStudent ID: studentID;
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
