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?

Answers were Sorted based on User's Feedback



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

Answer / jitendra kumar

i think you must be use heirarchi inheritance.
but best option is interface because it provide same feature
of multiple inheritance.In java, we can not use multiple
inheritance

Is This Answer Correct ?    2 Yes 2 No

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

Answer / 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

More Core Java Interview Questions

What is difference between string and new string?

0 Answers  


Give few examples of final classes defined in Java API?

0 Answers   BirlaSoft,


What is meant by vector class, dictionary class, hash table class, and property class?

0 Answers  


Define package in Java.

1 Answers  


Tell me the Importent classes in net package?

0 Answers  


What are the traverses in Binary Tree?

2 Answers   Adobe, Infosys,


What is an empty class? What functionality does it offer in Java?

0 Answers   Deloitte, EXL, JPMorgan Chase,


What is the exact difference in between unicast and multicast object? Where we will use?

0 Answers  


I have one POJO class(Java bean class), it has two variables for that it has setters and getters. Now i have created two objects for that class and i have set the data for those variables through this two objects. Now question is i want check whether those two objects have same data or not, for this write a program? Thanks, Bose.

2 Answers   Oracle,


What is anti pattern in cyber security?

0 Answers  


What is static variable and static method?

32 Answers   Accenture, Prolific, Prolifics, TCS, TNH,


What is boolean keyword in java?

0 Answers  


Categories