java.lang.ObjectPayrollCheck
ConsultantCheck
public class ConsultantCheck
ConsultantCheck class definition for consultants who receive a based on a one time basis. The field 'payment' is the gross pay to the consultant.
Field Summary | |
---|---|
(package private) java.text.DecimalFormat |
dollarsCents
|
(package private) java.text.DecimalFormat |
twoDecimals
|
Constructor Summary | |
---|---|
ConsultantCheck()
Implicit call to superclass PayrollCheck sets fields checkNumber and employeeID to default values zero (0). |
|
ConsultantCheck(int checkNumber,
int employeeID)
Explicit call to superclass PayrollCheck sets initial values for fields checkNumber and employeeID. |
Method Summary | |
---|---|
double |
getGrossPay()
Returns weekly gross pay which is the one time payment to a Consultant. |
double |
getPayment()
Returns current value of the payment field. |
java.lang.String |
printLine()
Returns detail line information for payment field and equivalent gross pay for a columnar report. |
void |
setPayment()
Sets the value for the payment field by making call to showInputDialog of imported class JOptionPane. |
java.lang.String |
toString()
Returns formatted payment field and equivalent gross pay including text labels. |
Methods inherited from class PayrollCheck |
---|
getCheckNumber, getEmployeeID, printHeading, setCheckNumber, setEmployeeID, setPayrollCheck |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.text.DecimalFormat dollarsCents
java.text.DecimalFormat twoDecimals
Constructor Detail |
---|
public ConsultantCheck()
public ConsultantCheck(int checkNumber, int employeeID)
checkNumber
- Number of payroll check from superclass PayrollCheck.employeeID
- Employee's identification number from superclass PayrollCheck.Method Detail |
---|
public double getGrossPay()
public double getPayment()
public java.lang.String printLine()
printLine
in class PayrollCheck
public void setPayment()
public java.lang.String toString()
toString
in class PayrollCheck