A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check. The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40. Instruction: Rank the given pseudocodes according to their order of action: If employee’s number of hours worked is less than 0, go to 5 Set employee’s hourly pay rate to 0 Set employee’s number of hours worked to 0 Print “Employee’s wage is ”, employee’s wage Else, employee’s wage = employee’s hourly pay rate x hours Else, go to 5 Else, go to 8 Get employee’s hourly pay rate Get employee’s number of hours worked Check for negative work hours Compute for the employee’s wage If employee’s hourly pay rate is less than 0, go to 2 If the employee’s number of hours worked is greater than 40, employee’s wage = (employee’s hourly pay rate x 40) + (1.5 x employee’s hourly pay rate x (hours worked – 40)) worked Check for negative pay rate Print “Enter employee’s pay rate: ” Print “Enter the employee’s number of hours worked: ”

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section6.4: A Case Study: Rectangular To Polar Coordinate Conversion
Problem 7E: (Simulation) Write a program to simulate the roll of two dice. If the total of the two dice is 7 or...
icon
Related questions
Question

A small company needs an interactive program to compute an employee’s paycheck. The payroll clerk will initially input the data, and given the input data, an employee's wage for the week should be displayed on the screen for the payroll check.

The data for the employee includes the employee's hourly pay rate and the number of hours worked that week. Wage is equal to the employee's pay rate times the number of hours worked (up to 40 hours). If the employee worked more than 40 hours, wage is equal to the employee's pay rate times 40 hours plus 1½ times the employee's pay rate times the number of hours worked above 40.

Instruction: Rank the given pseudocodes according to their order of action:

  • If employee’s number of hours worked is less than 0, go to 5
  • Set employee’s hourly pay rate to 0
  • Set employee’s number of hours worked to 0
  • Print “Employee’s wage is ”, employee’s wage
  • Else, employee’s wage = employee’s hourly pay rate x hours
  • Else, go to 5
  • Else, go to 8
  • Get employee’s hourly pay rate
  • Get employee’s number of hours worked
  • Check for negative work hours
  • Compute for the employee’s wage
  • If employee’s hourly pay rate is less than 0, go to 2
  • If the employee’s number of hours worked is greater than 40, employee’s wage = (employee’s hourly pay rate x 40) + (1.5 x employee’s hourly pay rate x (hours worked – 40)) worked
  • Check for negative pay rate
  • Print “Enter employee’s pay rate: ”
  • Print “Enter the employee’s number of hours worked: ”
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr