Question: Consider the class Student and the interface Researchable as described below each defined on their own java files: public class Student { } public

Consider the class Student and the interface Researchable as described below each defined on their own java

Consider the class Student and the interface Researchable as described below each defined on their own java files: public class Student { } public String name; public Student (String name) { } } public Student (Student s) { } this.name = name; } this.name = s.name; public String toString () { return name ; public interface Researchable { public void reseach (); Implement a class called PhdStudent that extends the class Student and implements the Researchable interface. It has a single private instance variable of type String, called reseach Track. (2pts for the class and fields). Your PhdStudent class should implement the following public methods: 1. Constructor with two parameters. This constructor will initialize a PhdStudent with the name and reseachTrack that are passed as parameters to this constructor. (2pts) 2. Constructor with one parameter. This constructor takes one String argument, which represents the reseachTrack value for the PhdStudent. It will initialize the field reseachTrack to be equal to the parameter, and the student's name to "undefined". You MUST call the constructor from part (1) above in your implementation of this constructor. (2pts) 3. Implement the Overriden equals method for PhdStudent: two phdStudents are equal if both have the same name and same reseachTrack. (2pts) 4. Override toString method which returns a String containing name and reseachTrack. (2pts) 5. possibly other method(s) that are required because of the fact that this class extends Student and implements Researchable. You DO NOT need to implement the method, just define the header and the body of the method(2pts) Consider the class Student and the interface Researchable as described below each defined on their own java files: public class Student { } public String name; public Student (String name) { } } public Student (Student s) { } this.name = name; } this.name = s.name; public String toString () { return name ; public interface Researchable { public void reseach (); Implement a class called PhdStudent that extends the class Student and implements the Researchable interface. It has a single private instance variable of type String, called reseach Track. (2pts for the class and fields). Your PhdStudent class should implement the following public methods: 1. Constructor with two parameters. This constructor will initialize a PhdStudent with the name and reseachTrack that are passed as parameters to this constructor. (2pts) 2. Constructor with one parameter. This constructor takes one String argument, which represents the reseachTrack value for the PhdStudent. It will initialize the field reseachTrack to be equal to the parameter, and the student's name to "undefined". You MUST call the constructor from part (1) above in your implementation of this constructor. (2pts) 3. Implement the Overriden equals method for PhdStudent: two phdStudents are equal if both have the same name and same reseachTrack. (2pts) 4. Override toString method which returns a String containing name and reseachTrack. (2pts) 5. possibly other method(s) that are required because of the fact that this class extends Student and implements Researchable. You DO NOT need to implement the method, just define the header and the body of the method(2pts)

Step by Step Solution

3.34 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image contains text which is a Java coding assignment The task is to implement a class called PhDStudent that extends the Student class and implem... View full answer

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!