An employee is paid at a rate of $18.28 per hour for the first40 hours worked in a week. Any hours over that are paid at theovertime rate of one and a half times that. From the worker’s grosspay, 6% is withheld for social security tax, 13% is withheld forfederal income tax, 5% is withheld for state income tax, and $11per week is withheld for union dues. If the worker has two or moredependents, then an additional $35 is withheld each week to coverthe extra cost of health insurance beyond what the employerpays.
Write a program in JAVA that stores the number of hours workedin a week and the number of dependants and then will output theworker’s gross pay, each withholding amount, and the net take-homepay for the week.
Remember: Use variables or named constants to store all numbersso that they can be changed later on if necessary. Do notrepeat calculations unnecessarily! Test your program withdifferent values for the variables to make sure it works in allscenarios!