Question: Define the class RA (in a new file named: RA.java) that inherits from the base class Graduate Student as shown in the UML above
Define the class RA (in a new file named: RA.java) that inherits from the base class Graduate Student as shown in the UML above and note the following: a. Declare the instance variables as in the UML. b. Implement the setters and getters for each data member in the class c. Implement the parametrized constructor of the RA subclass that invokes the super class's constructor to initialize the instance variables name and ID, and then initializes the instance variable monthlySalary. d. Implement the overridden method income, that returns the monthlySalary. e. Override the method print to print first the name and id of the student by using the super class's print method, followed by the text: "is a Research Assistant who makes a total income of AED".
Step by Step Solution
There are 3 Steps involved in it
java GraduateStudentjava Base Class public class GraduateStudent protected String name protected int ... View full answer
Get step-by-step solutions from verified subject matter experts
