Class Employee

java.lang.Object
  extended by Employee
All Implemented Interfaces:
UniversityPeople

public class Employee
extends java.lang.Object
implements UniversityPeople


Constructor Summary
Employee()
          Creates an employee with name "Fred Smith" and salary 40000.
Employee(java.lang.String name, int salary)
          Creates an employee with the given name and salary.
 
Method Summary
 java.lang.String getName()
          Returns the employee's name.
 int getSalary()
          Returns the employee's salary.
 java.lang.String report()
          Generates a report about this employee.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Employee

public Employee(java.lang.String name,
                int salary)
Creates an employee with the given name and salary.

Parameters:
name - Employee's name
salary - Employee's salary

Employee

public Employee()
Creates an employee with name "Fred Smith" and salary 40000.

Method Detail

getName

public java.lang.String getName()
Returns the employee's name.

Returns:
Employee's name.

getSalary

public int getSalary()
Returns the employee's salary.

Returns:
Employee's salary.

report

public java.lang.String report()
Generates a report about this employee. For example, the default employee's report would read: "Employee Fred Smith makes a salary of $40000 per year."

Specified by:
report in interface UniversityPeople
Returns:
Report about this employee.