Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The BelleTubbies Toy Company would like to computerize its weekly payroll system

ID: 3538181 • Letter: T

Question

The BelleTubbies Toy Company would like to computerize its weekly payroll system. Only the payroll calculations are to be programmed at this time. The input to the program will contain information for each of the company%u2019s employees. This information consist of the employee%u2019s name, number of hours worked for the current week, hourly wages, number of dependents, and marital status. The last two items are needed in order to calculate exemptions and withholding tax. Write a program to compute payroll and print a report, which includes information for all of the employees.

Payroll calculations:

A. Gross Pay:

Gross Pay = Regular Number of Hours Worked * Hourly Wages + Over Time Hours * (1.5 * Hourly Wages)

Note:

%u2022   Regular hours are 40 Hrs or less hours worked during a regular working week

%u2022   Over time hours are hours worked in excess of 40 Hrs per week.

B. Deductions:

a. If Married then Marital Deduction = 35, Else Marital Deduction = 0

           b. Dependent Deduction = Number of dependents * 50

Total Deduction = Marital Deduction + Dependent Deduction

C. Taxable Income:

Taxable Income = Gross Pay %u2013 Total deduction

D. Net Pay:

     Use the following table to calculate tax-withholding amount in belletubby world

Taxable Income

Taxes Withheld

     $0 to $150

0 percent (%) of Taxable Income

$151 to $350

10 percent (%) of Taxable Income

$351 to $500

15 percent (%) of Taxable Income

    Over $501

20 percent (%) of Taxable Income

Net Pay = Gross Pay %u2013 Taxes Withheld

Sample Test data:

Input:

John Doe worked for 50Hrs the current week, has hourly wage of $20 per hour, has 2 dependents and is married.

Output:

NAME

HOURLY RATE

HOURS WORKED

OVERTIME HOURS

GROSS PAY

NET PAY

John Doe

$20 Per Hour

50 Hrs

10 Hrs

$1100

$757.60

......

.......

.....

.......

.....

.....

  

Taxable Income

Taxes Withheld

     $0 to $150

0 percent (%) of Taxable Income

$151 to $350

10 percent (%) of Taxable Income

$351 to $500

15 percent (%) of Taxable Income

    Over $501

20 percent (%) of Taxable Income

Explanation / Answer

pseudocode BellTubbies_payrollsystem { step-1: Read :Name, No.of hours worked for the current week, hourly wages, No.of dependents, and marital status of Employee. Step-2:----------- A. Gross Pay: calculation Initialize over time hrs and regular hrs to 0 over time hrs=no.of hrs-40 if (over time hrs>0) then regular hrs=40 else over time hrs=0 regular hrs=no.of hrs worked end step-3: Calculate Gross pay as: Gross Pay = Regular Number of Hours Worked * Hourly Wages + Over Time Hours * (1.5 * Hourly Wages) step-4: ----------B. Deductions: If Married =yes then Marital Deduction = 35 Else Marital Deduction = 0 Dependent Deduction = Number of dependents * 50 Total Deduction = Marital Deduction + Dependent Deduction step-5:-------- C. Taxable Income: Taxable Income = Gross Pay -Total deduction step-6:------------D. Net Pay: if(Taxable Income >=0 and Taxable Income =151 and Taxable Income =351 and Taxable Income =501 ) Taxes Withheld=(20/100)*Taxable Income //20% of taxable income Net Pay = Gross Pay - Taxes Withheld step-6:-----Final printing Finally print the Net pay of the employee }