Class ConsultantCheck

java.lang.Object
  extended by PayrollCheck
      extended by ConsultantCheck

public class ConsultantCheck
extends PayrollCheck

ConsultantCheck class definition for consultants who receive a based on a one time basis. The field 'payment' is the gross pay to the consultant.

Version:
Copyright (c) 2008
Author:
Carl B. Struck

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

dollarsCents

java.text.DecimalFormat dollarsCents

twoDecimals

java.text.DecimalFormat twoDecimals
Constructor Detail

ConsultantCheck

public ConsultantCheck()
Implicit call to superclass PayrollCheck sets fields checkNumber and employeeID to default values zero (0). Call to setPayment() method sets payment to consultant.


ConsultantCheck

public ConsultantCheck(int checkNumber,
                       int employeeID)
Explicit call to superclass PayrollCheck sets initial values for fields checkNumber and employeeID. Call to setPayment() method sets payment to consultant.

Parameters:
checkNumber - Number of payroll check from superclass PayrollCheck.
employeeID - Employee's identification number from superclass PayrollCheck.
Method Detail

getGrossPay

public double getGrossPay()
Returns weekly gross pay which is the one time payment to a Consultant.

Returns:
Consultant's gross pay.

getPayment

public double getPayment()
Returns current value of the payment field.

Returns:
Payment to consultant.

printLine

public java.lang.String printLine()
Returns detail line information for payment field and equivalent gross pay for a columnar report. Preceded by checkNumber and employeeID fields from call to printLine() method of superclass PayrollCheck.

Overrides:
printLine in class PayrollCheck
Returns:
Payment and gross pay for a consultant check as part of a detail line as type String.

setPayment

public void setPayment()
Sets the value for the payment field by making call to showInputDialog of imported class JOptionPane.


toString

public java.lang.String toString()
Returns formatted payment field and equivalent gross pay including text labels. Preceded by checkNumber and employeeID fields from call to toString() method of superclass PayrollCheck.

Overrides:
toString in class PayrollCheck
Returns:
Formatted payment and gross pay for a consultant check as type String.