Question: This must be done in RAPTOR. This Payroll Program with Withholding will help a small business compute its weekly payroll, print out the information for

This must be done in RAPTOR.

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 employees 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 user, 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 did introduce 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, youll see that:

There is an outer flow (input the company-wide payroll rate information; initialize variables; etc.),

o thentheresaloopthat promptsforanemployeeIDnumber,and

if positive, it o promptsforallthepaycheckdata, o computesthepaycheck, o writesthatemployeespaycheck(outputsthedata,and)o addsthatemployeesgrosswages,taxwithheld,social

security and pension withholding amounts to their

respective accumulators;

  • and when theres no more employees to write checks for, it prints a report that says how

    many employees it wrote checks for, the total amounts of the gross pay and withholding

    amounts,

  • and then stops.

    (The lazy efficient programmer might study that indented bullet list, convince themselves as to whether it is or is not a correct way to do this program, and use it as a start on a pseudocode design for the program!

    But, were doing this in RAPTOR... pseudocode is optional, and if it helps you see what you have to do, then youre welcome to use it!

    Program requirements are on the following page

Program Requirements:

Input data:

For each employee, their name, ID number, hourly wage rate, number of hours worked, and the percentage of gross wages that they contribute to their pension plan each pay period.

For all employees (input once at start of program), the income tax withholding rate, the Social Security tax withholding rate

Output data:

For each employee, paycheck data consisting of name, ID number, wage rate, number of regular time hours worked, number of overtime hours worked (in excess of 40 hours), gross pay (including both regular pay for hours up to 40, and overtime at 1.5 times base pay rate for hours beyond 40 hours a week); income tax withheld (tax rate times gross pay); Social Security withheld (SS tax rate times gross pay); Contributions to Pension withheld (contribution rate times gross pay); Net pay (gross minus taxes and pension)

After last employee: output the running (cumulative) totals of the gross pay, income tax withheld, social security tax withheld, and pension contributions withheld.

Possible Error-Checking to Consider:

(1) If you added up the three withholding amounts (tax, social security, pension), and subtracted that number from the gross payroll, should it equal the total of all of the net pay that was paid to the employees across all of the paychecks? Why or why not?

(2) How should your program behave if the user puts in ridiculous values (such as an hourly wage rate of a million dollars and twelve cents)? Or a negative number for one of the withholding rates?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!