Answered step by step
Verified Expert Solution
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
Pseudocode
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 $ per hour.
Hours worked are in the range 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 InputOutput
Enter hourly pay rate.
Pay rate must be between and
Enter hourly pay rate.
Pay rate must be between and
Enter hourly pay rate.
Enter hours worked.
Hours must be between and
Enter a valid number.
Hours must be between and
Enter a valid number.
Employee gross pay: $
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started