Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Flowchart Pseudo - code Program Coded Program Output Problem Statement Design a program that prompts the user to enter an employee s hourly pay rate

Flowchart
Pseudo-code
Program Coded
Program Output
Problem Statement
Design a program that prompts the user to enter an employees hourly pay rate and the number of hours worked. Validate the users input to insure:
Pay rates are in the range $7.50-18.25 per hour.
Hours worked are in the range 0-40 hours.
The user should be prompted to enter data until it is correct for pay rates and hours worked.
After pay rates and hours worked are validated, the gross weekly pay should be calculated and displayed for the employee.
Your program should consist of the following modules:
Module main. Calls functions getRate and getHours to obtain valid pay rates and hours worked. Calls showGross to display gross pay.
Function getRate. Returns a valid pay rate input by the user.
Function getHours. Returns a valid number of hours input by the user.
Module showGross. Calculates and displays the gross pay with the pay rate and hours as parameters.
Expected Input/Output
Enter hourly pay rate.
5
Pay rate must be between 7.50 and 18.25.
Enter hourly pay rate.
20
Pay rate must be between 7.50 and 18.25.
Enter hourly pay rate.
15
Enter hours worked.
50
Hours must be between 0 and 40.
Enter a valid number.
42
Hours must be between 0 and 40.
50
Enter a valid number.
40
Employee gross pay: $ 600.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

Write each rational expression in lowest terms. 4x(x + 3) 8x(x 3)

Answered: 1 week ago

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago