Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a java program named Final.java Within the program, implement a class nam

ID: 3716806 • Letter: C

Question

Create a java program named Final.java Within the program, implement a class named Employee and a subclass of Employee named HourlyEmployee.

Employee has fields

First

Last

SSN

HourlyEmployee has fields

Wage

HoursWorked

Create methods to obtain data for each field. Override toString() for each class so that:

Employee returns the First + Last + SSN and

HourlyEmployee returns the Wage + HoursWorked.

Space appropriately. In the main() method, construct an instance of each class and fill with your name, a fictitious SSN, wage and hours worked. Call the toString() methods from each class to print the information you entered.

Explanation / Answer

Hi ,

Please find my code .

Output:

Pravesh Kuamr SBI1234 wage=4356.0, hoursWorked=250

Process finished with exit code 0

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote