Employeepublic class Employee extends Person
Fields Summary |
---|
private short | deptCode | private int | staffNumber |
Constructors Summary |
---|
public Employee(String firstName, String lastName, short dept, int number)
super(firstName, lastName);
setDeptCode(dept);
setStaffID(number);
|
Methods Summary |
---|
public void | setDeptCode(short dept)
deptCode = dept;
| public void | setStaffID(int number)
if (number < 1)
throw new IllegalArgumentException("Invalid staff number " +
number);
staffNumber = number;
|
|