Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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)

Step by Step Solution

3.34 Rating (148 Votes )

There are 3 Steps involved in it

Step: 1

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microeconomics An Intuitive Approach with Calculus

Authors: Thomas Nechyba

1st edition

538453257, 978-0538453257

More Books

Students also viewed these Programming questions