university
Class Employee

java.lang.Object
  extended by university.Person
      extended by university.Employee
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Faculty, Staff

public abstract class Employee
extends Person

Abstract class for the employees of the university.

See Also:
Serialized Form

Constructor Summary
Employee()
          Creates a new instance of Employee.
Employee(java.lang.String name, Sex gender, Address address, Unit unit, int salary)
          Creates a new instance of Employee
 
Method Summary
 java.lang.Object clone()
          Clone a new object
 int getSalary()
          Retruns the salary of the Employee.
 void setSalary(int salary)
          Sets the Employee salary.
 java.lang.String toString()
          Returns a String representation of the Employee.
 
Methods inherited from class university.Person
getAddress, getAffiliation, getGender, getID, getName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Employee

public Employee()
Creates a new instance of Employee.


Employee

public Employee(java.lang.String name,
                Sex gender,
                Address address,
                Unit unit,
                int salary)
Creates a new instance of Employee

Parameters:
name - The name of the Employee
gender - The sex of the Employee
unit - The Unit the Employee belong to
salary - The salary of the Employee
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Clone a new object

Overrides:
clone in class Person
Returns:
Object a cloned object
Throws:
java.lang.CloneNotSupportedException - Throws CloneNotSupportedException

getSalary

public final int getSalary()
Retruns the salary of the Employee.

Returns:
The employee salary

setSalary

public final void setSalary(int salary)
Sets the Employee salary.

Parameters:
salary - The salary of the Employee

toString

public java.lang.String toString()
Returns a String representation of the Employee.

Overrides:
toString in class Person
Returns:
A String representing the Employee