Question: NEED THIS JAVA PROGRAM IN 2 HOURS PLEASE Write and execute a program in Java using classes and objects that calculates and prints the monthly
| NEED THIS JAVA PROGRAM IN 2 HOURS PLEASE Write and execute a program in Java using classes and objects that calculates and prints the monthly package for an employee. The net pay is calculated after adding all the allowances to and subtracting all the deductions from the gross amount. Note: Assume that OMR refers to Omani Rials Allowances include the following: Housing: 15% of gross amount Transportation: 4% of gross amount Utilities: 6% of gross amount Family: 9% of gross amount Deductions include the following: Medicare: 3% of gross amount Pension or Gratuity: 3% of gross amount Health insurance: OMR 25.00 Formula to calculate the net pay: net pay = gross amount + allowances deductions where allowances = (Housing + transportation + Utilities + Family), and deductions = (Medicare + Pension or Gratuity + Health insurance) Create a class named employee, consisting of the following attributes or instance variables of int type: ? empname // name of employee of type String ? grosspay // gross amount of type double ? housing // housing allowance of type double ? transport // transportation allowance of type double ? utility // utilities allowance of type double ? medicare // medical insurance of type double ? pension // pension of type double ? health // health of type double and constant value of 25.00 Your program should prompt the user to input the gross amount and the employee name. Format your output to have two decimal places. |

Enter enployee nane: Mo hammed Arif Enter gross pay: Mo hammed Arif Gross Anount:500.0 Housing:75.0 Transportation:20. Utilities:30.0 Fanily:45.0 Medicare:15.0 Pension or Gratuity:15.8 Health Insurance:25.0 et Pay 615.0 Press any key to continue..._
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
