Consider the class Student and the interface Researchable as described below each defined on their own...
Fantastic news! We've Found the answer you've been seeking!
Question:
![Consider the class Student and the interface Researchable as described below each defined on their own java](https://dsd5zvtm8ll6.cloudfront.net/questions/2024/01/659bbe88e4ec6_1704795627269.jpg)
Transcribed Image Text:
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) 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)
Expert Answer:
Answer rating: 100% (QA)
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 the full answer
Related Book For
Microeconomics An Intuitive Approach with Calculus
ISBN: 978-0538453257
1st edition
Authors: Thomas Nechyba
Posted Date:
Students also viewed these programming questions
-
Let E be the group of Euclidean functions. Define a map : E R by (f) = f(0). Show that this is a group homomorphism. Compute the kernel of the homomorphism.
-
The summarized income and expense statement for the Dish N' Dat Company product line for the month of March is as follows: Sales Dish N' Dut Company Product-Line Income Statement For the Month Ended...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Solve the right triangles with the given parts or state that there is not enough information to solve. Round off results according to Table 4.1. Refer to Fig. 4.37. B = 32.1, c = 238 Data from Table...
-
Eastman, Inc., manufactures and sells three products: R, S, and T. In January, Eastman, Inc., budgeted sales of the following. At the end of the year, actual sales revenue for Product R and Product S...
-
Discuss how the globalization of markets affects retail distribution.
-
Package design influences taste. Can the package design of a food product, along with accompanying sounds, influence how the consumer will rate the taste of the product? A team of experimental...
-
The comparative balance sheets for 2011 and 2010 are given below for Surmise Company. Net income for 2011 was $50 million. Required: Prepare the statement of cash flows of Surmise Company for the...
-
Inventery Costing Methods-Periodic Methed
-
Red's Furniture Manufacturing produces a line of tables and chairs from specialty hardwoods. It makes three different styles of chairs, and each chair takes about the same amount of direct labour...
-
Q2. Tattle Company engaged in the following transactions in October 20XX. Oct. 7 Sold merchandise on credit to Lina Ortiz, $6,000 (cost, $3,600). Oct. 8 Purchased merchandise on credit from Ruff...
-
How do you demonstrate resilience as a leader during times of crisis or uncertainty, and what steps do you take to bolster your team's resilience ?
-
What would you do if it becomes clear to you that the potential successor you were grooming is not going to make the grade as a supervisor? What are your next steps? Do you think this grooming is...
-
How do services and products differ? What kind of decisions do companies make regarding products and services? Why are brands important to marketers? How do marketing strategies change during the...
-
What leadership principles do you feel you possess that are important for APRNs to exhibit? What principles do you need to explore to be more confident in performing? Which leadership style do you...
-
Question 1- Where do you go in the Courier to find out your amount of leftover inventory for a specific product last round? Based on the production tab of the worksheet I gave you; how do you use...
-
Hillyard Company, an office supplies specialty store, prepares its master budget on a quarterly basis. The following data have been assembled to assist in preparation of the master budget for the...
-
Coastal Refining Company operates a refinery with a distillation capacity of 12,000 barrels per day. As a new member of Coastal's management team, you have been given the task of developing a...
-
Suppose you and I have the same homothetic tastes over x1 and x2, and our endowments of the two goods are EM = (eM1, eM2) for me and EY = (eY1, eY2) for you. A: Suppose also, again as in exercise...
-
Government Competition, Leviathan and Benevolence: Suppose governments can spend taxpayer resources on both public goods that have social benefits and political rents that are private benefits for...
-
Consider the case of a positive consumption externality. A. Suppose throughout this exercise that demand and supply curves are linear, that demand curves are equal to marginal willingness to pay...
-
Im like the quarterback of the team. I manage 250 accounts, and anything from billing issues, to service issues, to selling the products. Im really the face to the customer, says Alison Capossela, a...
-
Does your marketing plan involve a personal selling activity? If the answer is no, read no further and do not include a personal selling element in your plan. If the answer is yes: 1 Identify the...
-
4 Listed here are two different firms. Which salesforce compensation plan would you recommend for each firm, and what reasons would you give for your recommendations? (a) A newly formed company that...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App