CS20 BAssignment 2
CS20 BAssignment 2
Due Dates:
Part1 – Complete design, coding, testing Employee class (due 3/4/2009)
Part2 – Complete design, coding, testing entire project (due 3/11/2009)
Note: Any one not completing and submitting part 1 on time will be
dropped from the class. Read design document 1 given to you on design
of Student class in detail to learn how to design Employee class.
Description
As a paymaster for Badwater Brewery, you are asked to determine the gross pay of
each employee based on the following information.
A percentage is added to the base pay depending upon as to how employee fares in
the following three categories.
Category 1: Job Classification: Use the following table to add to the Base pay.
Category 3: Educational Adjustment: Use the following table to add to the base pay.
Name
Jack Smith
M 1234 3 12 4
Years of
Educational
Service
Employee Code
code
Employee Job Classification
ID Number code
Joe Jones
O 1222 2 10 3
The data file may be empty or may have some invalid data. For example, the
number of years of service more than 50 will be invalid data. Or job classification or
Educational code may not be of the value allowed. Wrong Employee code may be
present.
Your task is to design a class to store “necessary” employee raw data and processed
data. Use an array of class to store all employee data in the file. You may design the
program to hold 30 employees (therefore 30 member array of class). The data file
may have more than 30 employee records however. In that case your program must
read only 30 records and give a message that number of records exceeded the
program capacity. If data file is empty, then program must print the message to
inform user that data file is empty. Modularize your program with functions as
much as you can.
Before you show me your program test, your data thoroughly using an empty file,
file with more than 30 records, and file with less than 30 records. I will provide you
the sample output from one of the data file, and a Xerox copy of the data file
shortly. The data file provided for the program will be namelist.txt.