Question: Write a GUI class PayRoll() that calculates the weekly pay given the hours worked and the pay rate. Hours worked over 40 hours per week
Write a GUI class PayRoll() that calculates the weekly pay given the hours worked and the pay rate. Hours worked over 40 hours per week are given time and a half. For example, 32 hours at $5/hr is $160.00 for the week. While, 50 hours at $20.00/hr yields $1,100.00 for the week.
Your GUI should have:
- two labels and two entry boxes for the user to enter the information
- a Button Compute Weeks Pay that, when clicked, computes the weeks paycheck and displays the amount in a third entry box
- The entry box that displays the weeks pay should display correctly, with a $ and two digits after the decimal.
- a Button Clear that clears the entries
- check for incorrect input (with a try and except)
- display this error message (for incorrect input) in a separate window: Uh-Oh, Invalid input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
