Class Employee

java.lang.Object
  extended by CommunityMember
      extended by Employee

public class Employee
extends CommunityMember

Employee class definition maintains and returns employee ID number information.

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

Constructor Summary
Employee(java.lang.String firstName, java.lang.String lastName, int employeeID)
          The constructor sets initial value for the employeeID field.
 
Method Summary
 int getEmployeeID()
          Returns current value of the employeeID field.
 java.lang.String printLine()
          Returns detail line information for employeeID field for a columnar report.
 void setEmployeeID(int employeeID)
          Sets the value for the employeeID field which must be between 1000 and 9999.
 java.lang.String toString()
          Returns formatted employeeID field including text labels.
 
Methods inherited from class CommunityMember
getFirstName, getLastName, printHeading, setCommunityMember, setFirstName, setLastName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Employee

public Employee(java.lang.String firstName,
                java.lang.String lastName,
                int employeeID)
The constructor sets initial value for the employeeID field. Explicit call to superclass CommunityMember sets initial values for fields firstName and lastName.

Parameters:
firstName - Employee's first name from superclass CommunityMember.
lastName - Employee's last name from superclass CommunityMember.
employeeID - Employee's ID number.
Method Detail

getEmployeeID

public int getEmployeeID()
Returns current value of the employeeID field.

Returns:
ID number of employee as data type int.

printLine

public java.lang.String printLine()
Returns detail line information for employeeID field for a columnar report. Preceded by firstName and lastName fields from call to printLine() method of superclass CommunityMember.

Overrides:
printLine in class CommunityMember
Returns:
Id number of employee as part of a detail line as type String.

setEmployeeID

public void setEmployeeID(int employeeID)
Sets the value for the employeeID field which must be between 1000 and 9999. A value of zero (0) indicates that employeeID field is empty.

Parameters:
employeeID - Employee's ID number.

toString

public java.lang.String toString()
Returns formatted employeeID field including text labels. Preceded by firstName and lastName fields from call to toString() method of superclass CommunityMember.

Overrides:
toString in class CommunityMember
Returns:
Formatted employee ID number field as type String.