Docsity

Object oriented programming -Programming Assignment 5 | COP 3330, Assignments of Computer Science

Toggle sidebar
bg1
Object Oriented Programming - Programming Assignment #5
Tax Time
Assigned: 4/5/07 (Thursday)
Due: 4/12/07 (Thursday) at 11:55pm WebCT time
Objective
1. Write several Java classes that utilize inheritance.
2. Writing code that adds to a given framework.
The Problem
In this assignment you will use inheritance to simplify the pay roll process for a
company. In particular, you will be given the abstract class Employee and be asked to
implement it in several classes. In particular, you will write the following classes:
1) HourlyEmployee implements Employee
2) SalariedEmployee implements Employee
3) ClericalStaff extends HourlyEmployee
4) PhoneStaff extends HourlyEmployee
5) Management extends SalariedEmployee
6) Researcher extends SalariedEmployee
7) ChiefExecutiveOfficer extends Management
Given Files
Your goal will be to complete the given files. Two of the files, Employee.java and
Payroll.java are completed for you. The first is the abstract class which manages any
employee object. The latter is a testing program that will work if you properly fill in the
code necessary in the rest of the classes. Your goal will be to write the empty methods in
the following classes: HourlyEmployee, SalariedEmployee, ClericalStaff, PhoneStaff,
Management, Researcher, and ChiefExecutiveOfficer. Detailed instructions are left for
you in the comments of these classes.
Output Sample
This is included in the posting of the homework assignment in the file payroll.out. This is
the output of running the file Payroll.java.
pf2

Partial preview of the text

Download Object oriented programming -Programming Assignment 5 | COP 3330 and more Assignments Computer Science in PDF only on Docsity!

Object Oriented Programming - Programming Assignment

Tax Time

Assigned: 4/5/07 (Thursday)

Due: 4/12/07 (Thursday) at 11:55pm WebCT time

Objective

  1. Write several Java classes that utilize inheritance.
  2. Writing code that adds to a given framework. The Problem In this assignment you will use inheritance to simplify the pay roll process for a company. In particular, you will be given the abstract class Employee and be asked to implement it in several classes. In particular, you will write the following classes:
  1. HourlyEmployee implements Employee
  2. SalariedEmployee implements Employee
  3. ClericalStaff extends HourlyEmployee
  4. PhoneStaff extends HourlyEmployee
  5. Management extends SalariedEmployee
  6. Researcher extends SalariedEmployee
  7. ChiefExecutiveOfficer extends Management Given Files Your goal will be to complete the given files. Two of the files, Employee.java and Payroll.java are completed for you. The first is the abstract class which manages any employee object. The latter is a testing program that will work if you properly fill in the code necessary in the rest of the classes. Your goal will be to write the empty methods in the following classes: HourlyEmployee, SalariedEmployee, ClericalStaff, PhoneStaff, Management, Researcher, and ChiefExecutiveOfficer. Detailed instructions are left for you in the comments of these classes. Output Sample This is included in the posting of the homework assignment in the file payroll.out. This is the output of running the file Payroll.java.

Deliverables You must submit a solution to the program described above in seven files: HourlyEmployee.java, SalariedEmployee.java, ClericalStaff.java, PhoneStaff.java, Management.java, Researcher.java , and ChiefExecutiveOfficer.java , over WebCT. Restrictions You must use a Java 5.0 compiler to develop your program. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include ample comments throughout your code describing the major steps in solving the problem. Grading Details Your program will be graded upon the following criteria:

  1. Your correctness
  2. Following the general guidelines for each class specified in the comments of the code given in the assignment.
  3. Your programming style and use of white space. (Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor you could get 10% or 15% deducted from your grade.)