Make your own free website on

Employee Class

Develop an employee class with the following fields

DeptCode  // 2 letter code representing the departments below:
Wage   // holds hourly salary
Hours  // hours worked per week

o       MK  Marketing 

o       IT  Information Technology 

o       PY  Payroll 

Create accessor and mutator methods for all of your fields. Additionally, create a method 
called getDeptName that returns the DeptName (shown above) based on the DeptCode passed to it.


Personnel Class

Develop a class that holds an ArrayList of Employees with the following methods on that ArrayList.

a. public void addEmployee(String f, String l, String dept, double wa, int h)

Add Employee - Inserts an Employee Object into the ArrayList. The maximum allowed employees for 
this company is 100 Once that limit has been reached, you will print the message "No longer hiring. 
Maximum employees reached". 

b. public void printEmployeeInfo()  // prints in format listed below


Name:  {Employee FullName}

Department:  {Department Name}  NOT Code 

Wage:  {Wage}  

Hours:  {Hours} 

Pay:      {Pay}    


c. public void removeEmployee(String first,String last)

//Remove Employee - Removes an employee from the ArrayList

d. public void printCompantInfo()  // prints info listed below

Total Employees:

Minimum Wage:

Maximum Wage:

Average Wage: 

Total Company Weekly Hours:

Total Company Weekly Pay:

e. public void printMarketingInfo()  // only for people with marketing code

Dept - Marketing

Total Employees:

Minimum Wage:

Maximum Wage:

Average Wage: 

Total MK Weekly Hours:

Total MK Weekly Pay: