Project 3 - Data Processing

Due - Friday, March 23, 2007

The goal of this project is to give you experience with object-oriented design an inheritance. You will write a payroll processing program that calculates the pay for several types of employees.

Your program will begin by reading from a file information about all employees of the organization. The organization will have three types of employees: staff, faculty, and students. Each Faculty entry will contain the following information: Each Staff entry will contain the same fields as the Faculty entry with the following additions: Each Student entry will contain the following information: The file employeedb.xml contains an example input file. Note, the input will be in XML format. For full credit, your program must correctly process files in the format given.

Your program will read in a file containing employee information and build an ArrayList of objects, each containing information about a particular employee. The ArrayList will be stored in an EmployeeDB class. The EmployeeDB will provide methods to calculate the payroll for the organization and provide output about various properties of the employees. For full credit, you must implement at least the following classes.

EmployeeDB - EmployeeDB contains an ArrayList of Employee objects. It also provides the following methods: Employee - Employee is an abstract class that represents information about an employee. You should include appropriate data members in this class, as well as an abstract method calculatePay. Finally, you should include any methods that may be used by all subclasses of Employee.

Faculty - Faculty is a subclass of Employee that represents information about a faculty member. To calculate the pay for a faculty member, first divide the faculty's yearly salary by 12 to get the base pay. Second, deduct the faculty member's retirement contribution. Third, deduct the contribution for health insurance; deduct $25 for Kaiser coverage and $50 for Blue Cross coverage. Fourth, deduct taxes based on the following schedule:
Yearly SalaryTax Rate
$0-$750010%
$7501-$2500015%
$25001-$7500020%
$75001-$15000025%
$150001-30%


Staff - Staff is a subclass of Employee that represents information about a staff member. Calculate the pay for a staff member in the same way you calculate the pay for a faculty member. Make sure that you also appropriately update the total vacation time taken by the staff member.

Student - Student is a subclass of Employee that represents information about a student. To calculate the pay for a student, multiply the wage times hours worked and then deduct the appropriate tax using the schedule you used for the faculty and staff. To determine the projected annual wage, multiply the current pay by 12.

You are encourage to expand this design by adding additional methods and/or classes. For example, you might consider using an abstract SalariedEmployee class and an abstract HourlyEmployee class. Faculty and Staff would then inherit from SalariedEmployee and Student would inherit from HourlyEmployee.

Make sure that you do not duplicate code. Whenever possible, use inheritance to avoid redundancy. Points will be deducted for poor design.

Due 9:40AM, Friday, March 23, 2007

  1. Complete and submit your working code. Turn in a hard copy in class and place a copy of your .java files in /home/submit/cs112-s07/username.
  2. Make sure that each function is well documented. Your documentation should specify the type and function of the input parameters and output.
  3. Run your program on a variety of inputs ensuring that all error conditions are handled correctly.
Note: No portion of your code may be copied from any other source including another text book, a web page, or another student (current or former). You must provide citations for any sources you have used in designing and implementing your program.
Sami Rollins