java.lang.ObjectPayee
public class Payee
The Payee class calculates payroll for regular and overtime workers. Updates data fields by calling the setHoursWorked() and setPayRate() methods.
Constructor Summary | |
---|---|
Payee()
No parameter constructor for objects of class Payee. |
|
Payee(double hoursWorked,
double payRate)
Constructor for objects of class Payee with parameters that initialize the hours worked and pay rate data fields. |
Method Summary | |
---|---|
double |
getGrossPay()
Calculates and returns employee gross pay. |
double |
getHoursWorked()
Accessor method for the hours worked data field. |
double |
getPayRate()
Accessor method for the pay rate data field. |
void |
printPayee()
Print method for Payee state. |
void |
setHoursWorked(double hoursWorked)
Mutator method for the hours worked data field. |
void |
setPayRate(double payRate)
Mutator method for the pay rate data field. |
Methods inherited from class |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Payee()
public Payee(double hoursWorked, double payRate)
hoursWorked
- the employee number of hours workedpayRate
- the employee hourly rate of payMethod Detail |
---|
public double getGrossPay()
public double getHoursWorked()
public double getPayRate()
public void printPayee()
public void setHoursWorked(double hoursWorked)
hoursWorked
- the employee number of hours workedpublic void setPayRate(double payRate)
payRate
- the employee hourly rate of pay