CSC407 OOP Example

plan.dom
Class Employee

java.lang.Object
  |
  +--plan.dom.Employee

public class Employee
extends java.lang.Object

An employee of the company.


Field Summary
private  java.lang.String name
           
 
Constructor Summary
(package private) Employee(java.lang.String name)
          Creates a new employee with the indicated name.
 
Method Summary
 java.lang.String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name
Constructor Detail

Employee

Employee(java.lang.String name)
Creates a new employee with the indicated name. Package access as all creation should be done via Company.

Parameters:
name - the (unique) name f the employee
Method Detail

getName

public java.lang.String getName()

CSC407 OOP Example