Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

i need income tax program using java inheritance concept.
could u please help me?

Answer Posted / pratima

import java.util.Scanner;
public class Main087
{
public static void main(String[] args)
{
float income,tax,surchrg;
System.out.print("Enter Income of person : ");
Scanner scan=new Scanner(System.in);
income=scan.nextFloat();
if (income<=50000.)
tax=0;
else if (income<=100000.00)
tax=(income-50000.00F)*10/100;
else if (income<=250000.00)
tax=(income-100000.00F)*20/100+5000;
else
tax=(income-250000.00F)*30/100+5000+30000;
if (tax>10000.00)
surchrg=tax*2/100;
else
surchrg=0;
System.out.printf("Income = %f
",income);
System.out.printf("TAX = %f
",tax);
System.out.printf("Surcharge = %f
",surchrg);
}
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java jit compilers?

980


What is internal variable?

996


What is a method declaration?

973


What is difference between checked and unchecked exception in java?

1005


Is 0 a prime number?

973


What do you mean by hashing?

1091


What is merge sort in java?

952


Why doesn't the java library use a randomized version of quicksort?

978


You're given a Boolean 2D matrix, can you find the number of islands?

1075


What does g mean in regex?

974


What does pointer mean?

1031


What type of value does sizeof return?

991


What is protected access modifier?

990


Explain public static void main(string args[]) in java.

968


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

967