Question: java code please Problem Statement Code an executable program that will calculate and display an employee's pay as illustrated in the Sample Runs below. Your

java code please java code please Problem Statement Code an executable program that will calculate

Problem Statement Code an executable program that will calculate and display an employee's pay as illustrated in the Sample Runs below. Your program must prompt the user for a name, hours worked, hourly pay rate, and whether or not a bonus should be added. Hours worked is an integer (whole) number. The hourly pay rate may include pennies (decimal positions). The earned amount is calculated as the hours worked multiplied by the hourly pay rate. The bonus is added to the earned amount if indicated (the user will enter a l if the bonus is to be added into the earned amount). Pay is calculated as the earned amount minus tax. Tax is 25% of the earned amount Your program must: 1. use variables with data types that reflect the data. 2. use a named constant called RATE to identify the .25 tax rate. 3. use a named constant called BONUS to identify the $100 bonus amount 4. use printf to display decimals: System.out.printf("Item String: $%.2f ", variable Value); %.2f is used to display calculated value with two and only two decimal positions. 5. Add comments to your code to indicate what you are doing Two sample runs: Enter employee's name: John Enter hours worked : 40 Enter hourly pay rate: 15.5 Include bonus (1-yes, Beno) : 1 I Day calculated for John Hours worked: 40 Hourly pay rate: $15.5 Bonus included: $100.0 Earned amount: $720.00 Calculated taxes: $180.00 Enter employee's namet lack Enter hours worked: Enter hourly pay rate: 15.5 Include bonus (1 yes, Brno) ! 1 Pay calculated for Jack Hours worked 40 Hourly pay rate: $15.5 Bonus not included. Earned amount: $620.00 Calculated taxes: $155.ee Net pay for John is: $540.00 Net pay for Jack is: 5.465.00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!