Tax Calculator
Tax Calculator
CODE
import java.util.*;
System.out.println("\t\t\t\
t___________________________________________________");
age=sc.nextInt();
System.out.print("Basic Salary-");
inc+=sc.nextDouble();
System.out.print("DA-");
inc+=sc.nextDouble();
System.out.print("Conveyance Allowance-");
inc+=sc.nextDouble();
System.out.print("HRA-");
inc+=sc.nextDouble();
System.out.print("Medical Allowances-");
inc+=sc.nextDouble();
System.out.print("Other Allowances-");
SU
inc+=sc.nextDouble();
System.out.print("Incentives-");
inc+=sc.nextDouble();
System.out.print("HRA Exempt-");
ded+=sc.nextDouble();
ded+=sc.nextDouble();
System.out.print("Standard Deduction-");
ded+=sc.nextDouble();
ded+=sc.nextDouble();
ded+=sc.nextDouble();
System.out.print("PPF-");
ded+=sc.nextDouble();
System.out.print("NPS-");
SU
ded+=sc.nextDouble();
ded+=sc.nextDouble();
System.out.print("Tution Fee-");
ded+=sc.nextDouble();
ded+=sc.nextDouble();
ded+=sc.nextDouble();
System.out.print("NPS Contribution-");
ded+=sc.nextDouble();
System.out.print("NSC-");
ded+=sc.nextDouble();
ded+=sc.nextDouble();
ded+=sc.nextDouble();
System.out.print("80D-Mediclaim Premium-");
ded+=sc.nextDouble();
gross=inc-ded;
if(age<60)
if(gross<=300000)
tax=0;
SU
else if(gross>300000&&gross<=600000)
tax=0.05*(gross-300000);
else if(gross>600000&&gross<=900000)
tax=(15000)+0.1*(gross-600000);
else if(gross>900000&&gross<=1200000)
tax=(45000)+0.15*(gross-900000);
else if(gross>1200000&&gross<=1500000)
tax=(90000)+0.2*(gross-1200000);
else
tax=(150000)+0.3*(gross-1500000);
else if(age>60&&age<=80)
if(gross<=300000)
tax=0;
else if(gross>300000&&gross<=500000)
tax=0.05*(gross-300000);
else if(gross>500000&&gross<=1000000)
tax=(10000)+0.2*(gross-5000000);
else
tax=(110000)+0.3*(gross-1000000);
else
if(gross<=500000)
tax=0;
SU
else if(gross>500000&&gross<=1000000)
tax=0.2*(gross-500000);
else
tax=(100000)+0.3*(gross-1000000);
System.out.println(" \n RESULT:-");
obj.accept();
obj.deduction();
obj.lessdeduction();
obj.calc();
obj.display();
SU