Problem:  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. Instructions: Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm. In the program flow, input and checking of hourly pay rate should come before that of the number of hours worked.   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:

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Problem: 

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.

Instructions:

Match the action at the left-side with the correct step number at the right-side (the attached picture). Note that it may be possible to group more than one related actions in the same logical step / process without altering the essence of the algorithm.

In the program flow, input and checking of hourly pay rate should come before that of the number of hours worked.

 

  • 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:
[Choose ]
[Choose]
4.2
4.1
7.2
7.1
7
PETISCO
2
1
5
8.2
6
8.1
8
Transcribed Image Text:[Choose ] [Choose] 4.2 4.1 7.2 7.1 7 PETISCO 2 1 5 8.2 6 8.1 8
Expert Solution
steps

Step by step

Solved in 3 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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education