0% found this document useful (0 votes)
8 views6 pages

Tax Calculator

fg

Uploaded by

darrendeepak2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views6 pages

Tax Calculator

fg

Uploaded by

darrendeepak2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

COMPUTER PROJECT

Submitted by : Darren Deepak


QUESTION
Develop a console based application using Java to calculate taxable income(only
direct tax)

CODE
import java.util.*;

public class taxINC

double inc,ded,gross,tax;int age;

public void accept()

Scanner sc=new Scanner(System.in);

System.out.println("\t\t\t\t\t Welcome to online tax calulator ");

System.out.println("\t\t\t\
t___________________________________________________");

System.out.println("Enter your Age-");

age=sc.nextInt();

System.out.println("\nEnter Your Incomes");

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();

public void deduction()

System.out.println("\nEnter Your Deductions");

Scanner sc=new Scanner(System.in);

System.out.print("HRA Exempt-");

ded+=sc.nextDouble();

System.out.print("Conveyance Allowance Exempt-");

ded+=sc.nextDouble();

System.out.print("Standard Deduction-");

ded+=sc.nextDouble();

System.out.print("Deduction(Interest on housing loan)-");

ded+=sc.nextDouble();

public void lessdeduction()

Scanner sc=new Scanner(System.in);

System.out.print("Tax Exemption FD-");

ded+=sc.nextDouble();

System.out.print("PPF-");

ded+=sc.nextDouble();

System.out.print("NPS-");

SU
ded+=sc.nextDouble();

System.out.print("Home Loan Repayment(Principal)-");

ded+=sc.nextDouble();

System.out.print("Tution Fee-");

ded+=sc.nextDouble();

System.out.print("Post Office Investment-");

ded+=sc.nextDouble();

System.out.print("Others(investment in mutual funds etc.)-");

ded+=sc.nextDouble();

System.out.print("NPS Contribution-");

ded+=sc.nextDouble();

System.out.print("NSC-");

ded+=sc.nextDouble();

System.out.print("Donation U/s 80G-");

ded+=sc.nextDouble();

System.out.print("Employee's Contribution to Employee Provident Fund-");

ded+=sc.nextDouble();

System.out.print("80D-Mediclaim Premium-");

ded+=sc.nextDouble();

gross=inc-ded;

public void calc()

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);

public void display()

System.out.println(" \n RESULT:-");

System.out.println("\n\t\tTaxable Income - ₹"+gross+"/-");

System.out.println("\t\tIncome Tax - ₹"+tax+"/-");

public static void main(String args[])

taxINC obj=new taxINC();

obj.accept();

obj.deduction();

obj.lessdeduction();

obj.calc();

obj.display();

SU

You might also like