Question
Make a monthly payroll in JAVA (filename: payroll.java) 7 methods should be created which will be the following. 1-. Calculate the federal tax: If earnings
Make a monthly payroll in JAVA (filename: payroll.java)
7 methods should be created which will be the following.
1-. Calculate the federal tax: If earnings are less than $8,000, the federal tax is 0, if total earnings are less than $15, 000, federal tax is 4% of income, if total earnings are less than $30,000 tax is 8% of income, anything else, tax is 12% of income
2-. Calculate provincial tax: earnings less than $10,000 provincial tax is 0, if earnings less than $20,000 provincial tax is 6%; if earnings less than $25,000 provincial tax is 10%; anything above $25,000 provincial tax is 14%
3-. CPP deduction calculation: if total earnings are less than $2,000 it is 0, if earnings higher than $2,000 the deduction is 7%, an employee could only contribute with $2,500 in one year
4-. Medical insurance deduction: it is 1.2% of the income, an employee could only contribute with $1,000 in one year
5-. total payroll deduction is the sum of the previous 4 deductions and taxes
6-. The total paycheck amount is the employees income minus the result of step 5
7-. Display the table (first print the income for the user to type it, then print the rest of the table)
sample of the output
Income: $ 12,000.00
Federal Tax: $ 480.00
provincial Tax: $ 720.00
CPP deduction: $ 840.00
Medical deduction: $ 144.00
Total paycheck: $ 9,816
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