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: ”

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 9PE
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
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr