in Education by
import java.io.*; class employee { int pan; String name; double taxincome; double tax; void input(int p1,String n1,double ti) { pan =p1; name=n1; taxincome=ti; } void calc() { if(taxincome>250000) tax=250000=(taxincome-250000)*0.3; else if(taxincome>150000) tax=5000+(taxincome-150000)*0.2; else if(taxincome>100000) tax=(taxincome-100000)*0.1; else tax=0; } void display() { System.out.println(“Pan Number Name Tax-income Tax”); System.out.println(“===================================================”); System.out.println(+pan+” “+name+” “+taxincome+” “+tax); } } class result { public static void main (String[] args)throws IOException { employee ob = new employee(); int p; String n; double ti; InputStreamReader reader = new InputStreamReader(System.in); BufferedReader input = new BufferedReader(reader); System.out.println(“Enter Pan : “); String c1 = input.readLine(); p= Integer.parseInt(c1); System.out.println(“Enter Name :”); n=input.readLine(); System.out.println(“Enter income :”); String c2 = input.readLine(); ti= Double.parseDouble(c2); ob.input(p,n,ti); ob.calc(); ob.display(); } } help something is wrong Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Hey mate I am suggesting you an app in which you can make any program related to java , html ,cccs etc. SOLOLEARN APP

Related questions

0 votes
    class Modulus { public static void main(String args[]) { double a = 25.64; int b = 25; a = a % 10; b = b % 10; ... (a + + b); } } Select the correct answer from above options...
asked Dec 19, 2021 in Education by JackTerrance
0 votes
    import java.util.*; class hello{ System.out.println(Math.ceil(-28.23)); } IN THIS CODE JAVA COMPILER IS ... URGENT .PLEASE . Select the correct answer from above options...
asked Dec 20, 2021 in Education by JackTerrance
0 votes
    The structure of a table Employee is given below. Suggest suitable data type and size of each column. Column name ... _ Design _ _ Select the correct answer from above options...
asked Dec 11, 2021 in Education by JackTerrance
0 votes
    To open the table, on the icon that has the required table name in Tables Pane of Database Window (A) Drag ... click (D) Triple Click Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    write the statement to convert a number stored in a string variable ‘num’ to a double data type. Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    a. State the number of bytes occupied by char and int data types. b. Differentiate between = and == ... implicit type conversion. Select the correct answer from above options...
asked Dec 6, 2021 in Education by JackTerrance
0 votes
    a. State the number of bytes occupied by char and int data types. b. Differentiate between = and == ... implicit type conversion. Select the correct answer from above options...
asked Dec 5, 2021 in Education by JackTerrance
0 votes
    a. State the number of bytes occupied by char and int data types. b. Differentiate between = and == ... implicit type conversion. Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    Name the class that is used for different mathematical functions.(in java) PLEASE ANSWER FAST URGENT HELP ... BRAINLIEST FOR SURE☆☆ Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
0 votes
    In Java, what will be the output of the following code and how? double x=2.9,y=2.5; (SOP is abbreviated form ... x),y)); Explain how Select the correct answer from above options...
asked Nov 28, 2021 in Education by JackTerrance
0 votes
    Raja is paying 12% of his salary to income tax. To store the tax details, an variable named “It” is used. What would be its data type? Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    ONLY CLASS 10th ICSE how to modify a string in computer programming Java I will mark brainliest……. Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    2. Size of int data type in java. . A32 and 64 B64and64 C32 and 32 D64and 32 Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
...