java.lang.ObjectPayrollCheck
public class PayrollCheck
PayrollCheck class definition maintains and returns check number and employee ID number.
Constructor Summary | |
---|---|
PayrollCheck()
No argument constructor sets fields checkNumber and employeeID to default values zero (0). |
|
PayrollCheck(int checkNumber,
int employeeID)
The constructor sets initial values for the checkNumber and employeeID fields. |
Method Summary | |
---|---|
int |
getCheckNumber()
Returns current value of the checkNumber field. |
int |
getEmployeeID()
Returns current value of the employeeID field. |
static java.lang.String |
printHeading()
Static method that returns heading lines to be printed at beginning of a columnar report. |
java.lang.String |
printLine()
Returns detail line information for checkNumber and employeeID fields for a columnar report. |
void |
setCheckNumber(int checkNumber)
Sets the value for the checkNumber field which must be between 1 and 9999. |
void |
setEmployeeID(int employeeID)
Sets the value for the employeeID field which must be between 10001 and 99999. |
void |
setPayrollCheck(int checkNumber,
int employeeID)
Sets values for the checkNumber and employeeID fields by calling setCheckNumber and setEmployeeID methods. |
java.lang.String |
toString()
Returns formatted checkNumber and employeeID fields including text labels. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PayrollCheck()
public PayrollCheck(int checkNumber, int employeeID)
checkNumber
- Number of payroll check.employeeID
- Employee's identification number.Method Detail |
---|
public int getCheckNumber()
public int getEmployeeID()
public static java.lang.String printHeading()
public java.lang.String printLine()
public void setCheckNumber(int checkNumber)
checkNumber
- Number of payroll check.public void setEmployeeID(int employeeID)
employeeID
- Employee's identification number.public void setPayrollCheck(int checkNumber, int employeeID)
checkNumber
- Number of payroll check.employeeID
- Employee's identification number.public java.lang.String toString()
toString
in class java.lang.Object