Question: Using java help with the TODO public class HourlyEmployee extends StaffMember { private int hoursWorked; private double payRate; public final static int MIN_HOURS = 40;
Using java help with the TODO
public class HourlyEmployee extends StaffMember { private int hoursWorked; private double payRate; public final static int MIN_HOURS = 40; public final static int MAX_HOURS = 160; //----------------------------------------------------------------- // Constructor: Sets up this hourly employee using the specified // information. //----------------------------------------------------------------- public HourlyEmployee(String name, String address, String phoneNumber, String ssn, double payRate) { super(name, address, phoneNumber, ssn); // TODO #4 done this.hoursWorked = hoursWorked; this.payRate = payRate; } //----------------------------------------------------------------- // Adds the specified number of hours to this employee's // accumulated hours. //----------------------------------------------------------------- public void addHours(int hoursToAdd) { // TODO #4 done hoursWorked += hoursToAdd; } //----------------------------------------------------------------- // Computes and returns the pay for this hourly employee. //----------------------------------------------------------------- public double calculatePayment() { // TODO #4 return payRate; // THIS IS A STUB } public boolean equals(Object o) { // TODO #4 return false; // THIS IS A STUB } //----------------------------------------------------------------- // Returns information about this hourly employee as a string. //----------------------------------------------------------------- public String toString() { // TODO #4 return "??"; // THIS IS A STUB } } 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
