• 100% Satisfaction Guarantee

Raj, Computer Engg.
Category: Programming
Satisfied Customers: 1282
Experience:  MS CS, 5+ Experience in Programming and Database (ERP)
16752232
Raj is online now

# Design an algorithm that will produce an employee payroll register

Design an algorithm that will produce an employee payroll register from an employee file. Each input employee record contains the employee number, gross pay, income tax payable, union dues and other deductions. Your program is to read the employee file and print a detail line for each employee record showing employee number, gross pay, income tax payable, union dues, other deductions and net pay. Net pay is calculated as gross pay-income tax-union dues-other deductions. At the end of the report, print the total net pay for all employees
Hi
When do you need the Algorithm?
Customer: replied 7 years ago.
in the next couple hours or so, or whenever you can get to it. also I just need the pseudocode. i have the defining diagram and hierarchy chart, here is some of the problem I have already started. maybe this will help you for what you need. Thanks for your help. this is what my teacher wrote to me, since i messed up the problem completely.

Hierarchy chart: should be Calculate net pay; also, you could just have 2 modules: the mainline and the one submodule called Calculate_net_pay

Algorithm: You can't use specific employee numbers and amounts. Remember, this is variables. Go back to problems done in prior chapters...net_pay = gross_pay - union_dues - etc.......

Work on and resubmit.

 Input Processing Output Emp_no Gross_pay Input employee record Read employee numbers Calculate gross pay Print employee details Emp_no Gross_pay Income_tax_payable Union_dues Other_deductions Net_pay Total_net_pay

 Employee number Gross_pay Income_tax_payable Union dues Other deductions 1 \$700 \$150 \$50 \$35 2 \$750 \$200 \$25 \$15 3 \$850 \$250 \$75 \$40
Ok i have one more question...

Is there any specific format for pseudocode or it can be done in anyform.......
Because i know two formats for pseudocode.....

One is simple other one is structured one with { }

If any specific then do specify....
Customer: replied 7 years ago.
here is an example of problems the teacher has done for us to show us what to do.

1 Design an algorithm that will prompt for and accept an employee’s annual salary, and calculate the annual income tax due on that salary. Income tax is calculated according to the following table and is to be displayed on the screen.
Portion of salary Income tax rate (%)
\$0 to \$4999.99 0
\$5000 to \$9999.99 6
\$10 000 to \$19 999.99 15
\$20 000 to \$29 999.99 20
\$30 000 to \$39 999.99 25
\$40 000 and above 30

Your program is to continue to process salaries until a salary of zero is entered.
A Defining diagram
Input Processing Output
salary Prompt for salary income_tax
Get salary
Calculate income_tax
Display income_tax

B Hierarchy chart
?
C Solution algorithm
Note: The program will continue to process salaries, until a salary of zero is entered.

Mainline
Process_employee_salary
Prompt for salary
Get salary
DOWHILE salary NOT = 0
Calculate_income_tax (salary, income_tax)
Display ‘Income tax due = ’, income_tax
Prompt for salary
Get salary
ENDDO
END

Calculate_income_tax (salary, income_tax)
IF salary < 5,000 THEN
income_tax = 0
ELSE
IF salary < 10,000 THEN
income_tax = salary * 0.06
ELSE
IF salary < 20,000 THEN
income_tax = salary * 0.15
ELSE
IF salary < 30,000 THEN
income_tax = salary * 0.2
ELSE
IF salary < 40,000 THEN
income_tax = salary * 0.25
ELSE
income_tax = salary * 0.3
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
END
Ok i will post algorithm within an hr.
Will that be fine?
Customer: replied 7 years ago.
yea man, thats cool. Thanks for your help. really appreciate it!!
Customer: replied 7 years ago.
also, where will it post at? will it send me a confirmation email?
I am done with algorithm
Just want to ask is the information of employee present in file or is that to be entered by the user?
Customer: replied 7 years ago.
Just send it through file if that is cool?
Ok then i am done with algorithm:

GLOBAL VARIABLE Total_net_pay

MODULE MAIN()
INPUT: An non empty file with name "Employee_Detail.txt"
OUTPUT: Net Pay of all employees and at the end Total Net Pay

Get Employee Details
FOR all records
Calculate_net_pay(Gross_pay,Income_tax_payable,Union_dues,Other_deductions)
Display 'Net Pay = ', Net_pay
END FOR LOOP
Display 'TOTAL Net Pay = ', Total_net_pay
END MAIN MODULE

MODULE Calculate_net_pay(Gross_pay,Income_tax_payable,Union_dues,Other_deductions)
Net_pay=Gross_pay - Income_tax_payable - Union_dues - Other_deductions
Total_net_pay=Total_net_pay + Net_pay
End Calculate_net_pay MODULE

If not needed remove the bold part from the algorithm......