Question: My Person.java file code is: import java.util.Date; public class Person { // fields of class private String ID ; private String firstName ; private String

My Person.java file code is:
import java.util.Date; public class Person { // fields of class private String ID ; private String firstName ; private String lastName ; private String title ; private int YOB ; // constructor public Person(String iD, String firstName, String lastName, String title, int yOB) { ID = iD; this.firstName = firstName; this.lastName = lastName; this.title = title; // validating YOB if (yOB >= 1900 && yOB = 1900 && yOB 1 Create a Worker.java class inherit from Person) Worker Fields double hourlyPayRate; Methods Constructor - the constructor should set all properties from the Person and Worker class. - The constructor should call super() to call the constructor for the Person and then go on to set the rest of the fields. Getters and Setters return the pay total. Hours under 40 are at the HourlyRate, hours above 40 are at time and a half (1.5) public double calculateWeeklyPay(double hoursWorked) public String displayweeklyPay(double hoursWorked) should indicate the number of hours of regular pay (40) and the total and the number of hours of overtime pay and the total as well as the total combined pay. 1 Create a SalaryWorker Class inherit from Worker) Salary Worker Fields double annualSalary: Methods Constructor - sets all properties from the Person, Worker, and SalaryWorker classes - The constructor for SalaryWorker should use super() to call the constructor for Worker which in turn, calls the constructor for the Person class. Getters and Setters public double calculateWeeklyPay(double hoursWorked) Override calculateWeeklyPay to return the pay total. - Note that the parameter hoursWorked is not used here but is retained for polymorphism. - Take the annualSalary and divide by 52 to get the weekly pay. public String displayWeeklyPay(double hours worked) Override display WeeklyPay - The return value should indicate that the weekly pay is a fraction of the yearly salary Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
