The second part of your payroll program (withholding) will help a small business compute its weekly payroll, print out the information for each paycheck, and keep running totals on gross payroll, as well as various withholding funds such as taxes, social security, and pension.
PAYROLL PROGRAMMING TASK 2
Spiral Development Plan
This Payroll Program with Withholding will help a small business compute its weekly payroll, print out the information for each paycheck, and keep running totals on gross payroll as well as various withholding funds – taxes, social security, and pension.
In order to do that, it will have to create some variables for those cumulative or running sums, and each time it inputs, computes and outputs an individual employee’s paycheck, it will need to add those values to these accumulator variables.
The wage rates, tax rates, wages, etc., are all in a currency of your choice – just be consistent with the symbol you use, the prompts you give the, etc. But – all computations, inputs, and outputs will be in that base currency. No “currency exchange” needed here!
“What kind of numbers?” For a start, use floating point numbers (reals).
Design Considerations
Chapter two introduces the concept of a module as a stretch of code that you name, define its work, and then CALL it to use it when you need to. You may find this module approach makes designing the program easier. Even without it, you’ll see that: