Write a Java application that prompts a user for a fist name and a last name, and then asks if a user is a company's employee. If positive - prompt for an hourly pay rate and hours worked. Compute the gross pay (hours times rate), withholding tax, and net pay ( gross pay minus withholding tax). Withholding tax should be computed as percentage of gross pay based on the following scale:
Gross Pay
|
Withholding Percentage
|
0 to 300.00
|
8%
|
300.01 to 400.00
|
10%
|
400.01 to 500.00
|
12%
|
500.01 and over
|
15%
|
Display the user's name (first and last), hourly rate, hours worked, withholding tax percentage, withholding tax and gross pay.
When a user is not an employee - display the proper message on that and terminate the application.
Use logical AND and OR operators when designing the logic of the application.
Save the file as ComputePay.java.
Note: if preferred you can use JOptionPane input dialog instead of the Scanner class.