P A Y 6
SPECIFICATIONS FOR:
Payroll Project -- version 6
This version introduces arrays and separates "employee data" from "payroll data".
Note:
All previous specifications apply to this version, unless otherwise noted.
PURPOSE:
Weekly payroll processing.
Input employee data into arrays.
Then, input hours to produce pay stubs and checks.
Also produce various reports and summaries.`
DESCRIPTION:
Produce a "pay stub" and a "check"
for each employee who worked during the week.
Also display various reports and summaries.
There are three stages to normal operation of this program:
- Enter employee data.
(Click the "STORE" button to save data into the arrays.)
- Enter ID and hours for one employee. Then click "PAY" button
to produce stub and check.
- Produce reports, summarizing payroll information
(such as total pay, average pay, number of employees working overtime, etc.)
EVENT HANDLERS:
- ADD EMP.
Add a new employee,
by inputting employee data from the form,
and storing it in the arrays.
The ID must be unique, and the data must be correctly entered.
Update the employee counter ("many") each time.
- **** Next version will include the following:
LOAD DATA
In the next version, this event handler should read from a file
(using "Comma Separated Values"),
and store employee data into the arrays.
- LOOKUP
Input the ID, and check if this employee exists.
If so, fill in the
employee datanto the textboxes
(so that it can be input by the "PAY" event).
- PAY
Perform the following:
1. Input the employee data and hours.
2. If data is incomplete or incorrect, display an error message;
otherwise, calculate all amounts.
3. Then produce the stub and the check.
(Be sure to use using separate methods for input, calculations, and output.
No I/O or calculation is permiotted in the handlers.)
- NEXT
Clear all inputs and both outputs,
to prepare for next employee.
- REPORT
Produce a report, summarizing payroll information
(such as total pay, average pay, number of employees working overtime, etc.)
- DISPLAY
Display the contents of the arrays
showing one employee per row.
Use the "stub area for output.
Try to arrange the data in neat columns,
appropriately formatted,
and with column headings.
- **** Next version will include some buttons to sort the arrays.
IMPORTANT NOTES:
All previous specifications apply to this version, unless otherwise noted.
(Calculations for gross, deductions, taxes, net pay, etc. are unchanged.
See previous specifications for details.)
ALSO:
- All handlers must be fully modularized: No I/O or computation is permitted in handlers.
- Each sub or function must begin with a COMMENT that says what it is trying to do.
- Use meaningful names for all variables and methods.
- Do not include any code that is unnecessary or irrelevant.
(Extensions, enhancements, or improvements are OK,
but credit will be deducted for coding that has nothing to do with the project.)