Class Faculty

java.lang.Object
  extended by CommunityMember
      extended by Employee
          extended by Faculty

public class Faculty
extends Employee

Faculty class definition maintains and returns department information.

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

Constructor Summary
Faculty(java.lang.String firstName, java.lang.String lastName, int employeeID, java.lang.String department)
          The constructor sets initial value for the department field.
 
Method Summary
 java.lang.String getDepartment()
          Returns current value of the department field.
 java.lang.String printLine()
          Returns detail line information for department field for a columnar report.
 void setDepartment(java.lang.String department)
          Sets the value for the department field which must be a String contained in departmentList ArrayList.
 java.lang.String toString()
          Returns formatted department field including text labels.
 
Methods inherited from class Employee
getEmployeeID, setEmployeeID
 
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

Faculty

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

Parameters:
firstName - Faculty member's first name from indirect superclass CommunityMember.
lastName - Faculty member's last name from indirect superclass CommunityMember.
annualSalary - Faculty member's ID number from superclass Employee.
department - Department in which faculty member works.
Method Detail

getDepartment

public java.lang.String getDepartment()
Returns current value of the department field.

Returns:
Department of faculty member as type String.

printLine

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

Overrides:
printLine in class Employee
Returns:
Department of faculty member as part of a detail line as type String.

setDepartment

public void setDepartment(java.lang.String department)
Sets the value for the department field which must be a String contained in departmentList ArrayList. Valid departments are "CENTRAL", "COMPUTER", "ENGLISH", "MATH", and "SCIENCE". An empty String value indicates that the department field is empty.

Parameters:
department - Faculty member's department.

toString

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

Overrides:
toString in class Employee
Returns:
Formatted department field as type String.