Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 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 Ask a user if she/he wants to add a medical insurance. If positive, offer three choice (each of them can be added independently from others): 1) medical insurance at $50.2) dental insurance at $25, 3) long term disability at $10. Deduct the selected insurance(s) from the gross pay If the deductions exceed the gross pay, display an error message, otherwise display the pay amount to be sent to a user. 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 Do not forget to include the proper comments for each of the statements and add the proper application header Note: if preferred you can use JOptionPane input dialog instead of the Scanner class. Note: you can use the JOptionPane input dialog or the Scanner class to accept user's input dala Submit ComputePay java file and a MS Word .doc file with the screen shots of the running application and detailed explanation of your solution Zip these two files ( a java file and MS Word file) as one zip archive By Day 7
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started