Question: a GUI program to calculate how much to pay their hourly employees. The US Department of Labor requires that employees get paid time and a
a GUI program to calculate how much to pay their hourly employees. The US Department of Labor requires that employees get paid time and a half for any hours over 40 they work in a single week. For example, if an employee works 45 hours, they get 5 hours of overtime, at 1.5 times their base pay. The Commonwealth of Virginia requires that hourly employees be paid at least $8.25 an hour. Wombat Corporation policy states that they will pay a maximum of 60 hours and a minimum of 4 hours per week.
Specifications
Write a program that will allow users to enter an Employees ID Number, Base Pay amount, and the Hours Worked for a particular week. This information will be added to a list of employees showing the entered information and the paycheck amount. So the list would look something like this after a couple of entries:
Base Pay and Pay Amt must be formatted like currency. Hours Worked must show 2 decimal places.
Use a Border layout for your program.
The Center Region is where the table of information will be displayed.
The Top Region contains fields for the user to enter employee data and an Add button. Pressing Add to insert the information into the table in the Center Region.
The Bottom Region should have a field containing the total Pay Amt for all entries. For the example above, an amount of $1,275.81 would be displayed.
The Right Region should have 4 vertical Radio Buttons labeled Raises. The 4 buttons should be labeled, from top to bottom, 1%, 2%, 5%, and Reset. If the user selects any of the first 3 buttons, you will need to increase each Pay Amt by that percentage.
If the user pressed the 5% Radio Button, the example above would look like:
and the Total would be $1,339.61.
If the user clicks Reset, the amounts go back to their original values.
Hint: Store the values entered in an Array or ArrayList and rebuild a GridPane accordingly to show the information.
Error Checking
Inputs
Make sure all fields are numbers.
Employee Number should be an Integer.
Base Pay should not be below the minimum wage allowed.
Hours Worked should not be less than 4.
All fields need to be correct when the Add button is pressed.
Use a Try-Catch blocks where you deem appropriate.
Significant variables descriptions.
No loop variables. a, b, c, x, y, z, etc.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
