Reference no: EM132365965
Assignment task
Write a java console application for calculating income tax for N company employees. N should be declared as a constant and it should be equal to the largest digit of your student II) number (e.g. if your ID number is 5456222 then N should be equal to 6 and you can declare it as final int N=6). The income tax and tax group for taxable income are shown below in Table I.
Table I. Income Tax and Tax Group for Taxable Income
Taxable Income
|
Income Tax
|
Tax Group
|
$0 - $18200
|
$0
|
Group 1
|
$18201 - $37000
|
$0 plus 19c for each SI over $18200
|
Group 2
|
$37001 - $87000
|
$3572 plus 32.5c for each $1 over $37000
|
Group 3
|
$87001 - $180000
|
$19822 plus 37c for each $1over $87000
|
Group 4
|
$180001 and over
|
$54097 plus 45c for each $1 over $180000
|
Group 5
|
The application should ask the user to enter the taxable income for each employee (total N employees) and calculate the income tax for each employee. The application should display the income lax for each employee as shown in the example below.
At the end of the NM employee. the details such as highest lax. lowest tax, number of employees in Group I. number of employees in Group 5 and tax group with highest number of employees should be displayed.
If more than one group has the same number of employees then the group with higher number should he displayed, e.g. Group I and Group 5 both have 2 employees which is highest number of employees then 5 should be displayed).
Example for N=6
Enter the taxable income for employee 1: 17500
The income tax for employee 1 is $0.00
Enter the taxable income for employee 2: 19200
The income tax for employee 2 is $190.00
Enter the taxable income for employee 3: 38000
The laconic tax for employee 3 is $3897 00
Enter the taxable income for employee 4: 90000
The income tax for employee 4 is $20932.00
Enter the taxable income for employee 5: 181000
The income tax for employee 5 is $54547.00
Attachment:- Code.rar