IDENTITFICATION:       "pay3"
Source file name is "XYZpay3.java" (where "XYZ" are your initials).
Payroll project, version 3, for CS16 term project (Spring 2008).

PURPOSE:
Calculate weekly payroll information for each employee, including:
· gross-pay
· deductions
· taxes
· net-pay
Output a "paystub" and "paycheck" for each employee.
Also, produce a payroll "summary" report for management, including:
total payroll amount
total deductions
total taxes
number of employees working, this week
number of employees receiving overtime, this week

DESCRIPTION:
Write a Java program to do the following for each employee:   [See references, below]:

  1. Read "Employee Data" [I1] and "Weekly Data" [I2]
  2. Calculate results [P1] needed for outputs, etc.
  3. Output both the "paystub" [O1] and the "paycheck" [O2].
After the last employee has been processed, produce a management report [See O3].

INPUT from keyboard, for each employee:
NOTE:  See [R1]. [R2]. etc for further restrictions on input values
(to be enforced by validation programming in the input methods).
I1 Employee Data:
Symbol Description Example Notes & restrictions
id Employee ID number 9842 4 digits
Zero indicates no more employee data
name Employee Name
(Last, First Mid-init.)
Adams, John Q. Comma after last name, period after Initial
Space required before Initial;. (Other spaces optional.)
rate Hourly pay rate. 12.75 (In dollars, with cents as a 2-place decimal.)
code Overtime code 2 Must be 1, 2, 3, 4, or 5.
numdep Number of dependents 3 (A whole number; may be zero; not negative.)
I2 Weekly Timeclock Data:
Symbol Description Example Notes & restrictions
hours Hours worked, this week 47.2 Hours, to the nearest tenth.
(Tenths, only no hundredths.)

Note: Enforcment of input restrictions should be added gradually to the input methods, in your term project. If the input value violates a restriction, display an informative message, and prompt again for the input. However, it is not necessary (or advisable) to add these validations immediately; the program may be developed and (partially) tested without them.


OUTPUT to video display terminal.
Pay-stub:   Output the following calculated values
(plus any other input data appropriate for a weekly pay-stub for an employee).
Make sure that each value is appropriately identified, so that the user knows what it means.
gross-pay
deductions
taxes
net-pay
Paycheck:   Also output a simulated paycheck, similar to the following:
National Widget Corp. 15 March 2008
Pay to the order of: ______John Q. Adams__________
The sum of: $634.32
First National Bank of Fredonia Signature:_______________________
Report: When employee payroll processing is done, produce a payroll "summary" report for management, including:
Total payroll amount
Total deductions
Total taxes
 
Number of employees working, this week
Number of employees receiving overtime, this week


CALCULATIONS