• 100% Satisfaction Guarantee

Raj, Computer Engg.
Category: Programming
Satisfied Customers: 1267
Experience:  BE CS, 4+ Experience in Programming and Database (ERP)
16752232
Raj is online now

# Design an algorithm that will produce an employee payroll register

### Resolved Question:

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
Submitted: 5 years ago.
Category: Programming
Expert:  Raj replied 5 years ago.
Hi
When do you need the Algorithm?
Customer: replied 5 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
Expert:  Raj replied 5 years ago.
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 5 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
Expert:  Raj replied 5 years ago.
Ok i will post algorithm within an hr.
Will that be fine?
Customer: replied 5 years ago.
yea man, thats cool. Thanks for your help. really appreciate it!!
Customer: replied 5 years ago.
also, where will it post at? will it send me a confirmation email?
Expert:  Raj replied 5 years ago.
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 5 years ago.
Just send it through file if that is cool?
Expert:  Raj replied 5 years ago.
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......
Raj, Computer Engg.
Category: Programming
Satisfied Customers: 1267
Experience: BE CS, 4+ Experience in Programming and Database (ERP)

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Last | Next >
• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland

• ### ATLPROG

#### Satisfied Customers:

7463
MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML
< Last | Next >

### ATLPROG

#### Satisfied Customers:

7463
MS in IT.Several years of programming experience in Java C++ C C# Python VB Javascript HTML

### LogicPro

#### Satisfied Customers:

5603
Expert in C, C++, Java, DOT NET, Python, HTML, Javascript, Design.

#### Satisfied Customers:

1158
Good knowledge of OOP principles. 3+ years of programming experience with Java and C++. Sun Certified Java Programmer 5.0.

### lifesaver

#### Satisfied Customers:

950
Several years of intensive programming and application development experience in various platforms.

### ehabtutor

#### Satisfied Customers:

864
Bachelor of computer science, 5+ years experience in software development, software company owner

### Raj

#### Satisfied Customers:

860
BE CS, 4+ Experience in Programming and Database (ERP)

### Eljon

#### Satisfied Customers:

590
11 yrs of programming (PHP, WordPress, XSL, SQL, JavaScript)

## Related Programming Questions

Chat Now With A Programmer
Raj
SAP ABAP Consultant
904 Satisfied Customers
BE CS, 4+ Experience in Programming and Database (ERP)