You’ve been hired by Alfaro’s Rubber Ducky Mart, a Chicago-based small business with 12 employees, to write a program that processes their weekly employee payroll
You’ve been hired by Alfaro’s Rubber Ducky Mart, a Chicago-based small business with 12 employees, to write a program that processes their weekly employee payroll. The user interface looks like this:
Above, you see that the user will input the following information: Employee ID number, Hourly Pay Rate, and Hours Worked. There is also a checkbox which the user can tick if the employee is Exempt from overtime. (Managers, for example, are exempt from overtime.)
Federal law states: “Unless exempt, employees… must receive overtime pay for hours worked over 40 in a workweek at a rate not less than time and one-half their regular rates of pay.” (Source: Overtime Pay | U.S. Department of Labor)
In other words, if an employee regularly makes $20/hour, that person will be paid their regular rate of pay for the first 40 hours worked in a week. For any hours over 40 worked that a week, the person receives $30/hour (150% their regular rate of pay, also called “time and one-half”). Managers are exempt from overtime pay and are always paid at the same hourly rate, regardless of the number of hours worked.
The Project
You may choose either to create a flowchart or write pseudocode for this project. If you choose to create a flowchart, you must use standard flowcharting symbols. (Please refer to Flowchart In Programming in Week 6.)
- The program should accept input in the fields shown above: Employee ID, Hourly Pay Rate, and Hours Worked. There is also an optional checkbox for an Exempt employee.
- The program should validate the user input to make sure everything is within expected ranges:
- If the user enters something that is not a number for either Hourly Pay Rate or Hours Worked, an error message should be displayed, and the person enter new values before the program moves on.
- If the Hours Worked field contains a negative number, an error message should be displayed, and the person enter new values before the program moves on. (It is not possible to work a negative number of hours!)
- Minimum wage in Chicago is $14.50/hour for small businesses with 20 or fewer employees. If the user enters an Hourly Pay Rate that is less than $14.50/hour, an error message should appear telling the user that they cannot enter a rate that is less than the minimum wage. The person must enter a new value before the program moves on.
- If the Hourly Pay Rate is $100 or greater, or if the Hours Worked value is 80 or greater, a prompt should appear: “Are you sure?” The user can select either YES (which continues the calculation) or NO (which goes back to allow the user to enter new values).
- Next, if all the input is valid, the program should perform the calculation.
- For all hours up to 40, the employee gets paid their standard rate of pay.
- For any hours over 40, the employee gets paid 1.5 times their standard rate of pay, unless they are an exempt employee (i.e, unless the Exempt box is checked). If the Exempt box is checked, the employee gets paid their standard rate of pay for any hours over 40.
- Round the total amount of pay to two decimal places (dollars and cents).
- The program should output one dollar amount for the user’s paycheck, for example:
EMPLOYEE: 0123456 AMOUNT PAID: $ 775.23
Show how you would structure the program to accomplish all of this above, using either a flowchart or pseudo code. Please submit your completed project as a PDF file only. (If you’re using Microsoft Office, select Save as Adobe PDF or Print to PDF.) If I cannot open your file, you will receive a zero grade. (I am not tracking anyone down during the break to ask them to resubmit a file!)
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.