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:
|
|
DESCRIPTION:
Write a Java program
to do the following for each employee:
[See references, below]:
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;. |
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.
| Paycheck:
Also output a simulated paycheck, similar to the following:
|
| Report:
When employee payroll processing is done,
produce a payroll "summary" report for management, including:
|
|
CALCULATIONS