Computer Science, asked by bhagattarun797, 6 hours ago

define a class IncomeTax to input name of employee ,pan number, Aadhar number, mobile number, address and monthly income calculate annual income and also calculate the Income-Tax as per the table given below print all the details in tabular format including done net amount (annual income - tax) annual income upto 250000 income tax rate nil >250000 to 500000 5 percent >500000 to 1000000 20 percent above 1000000 30 percent Java program​

Answers

Answered by rameshrajput16h
1

Answer:

import java.util.Scanner;

public class Employee

{

private int pan;

private String name;

private double taxincome;

private double tax;

public void input() {

Scanner in = new Scanner(System.in);

System.out.print("Enter pan number: ");

pan = in.nextInt();

in.nextLine();

System.out.print("Enter Name: ");

name = in.nextLine();

System.out.print("Enter taxable income: ");

taxincome = in.nextDouble();

}

public void cal() {

if (taxincome <= 250000)

tax = 0;

else if (taxincome <= 500000)

tax = (taxincome - 250000) * 0.1;

else if (taxincome <= 1000000)

tax = 30000 + ((taxincome - 500000) * 0.2);

else

tax = 50000 + ((taxincome - 1000000) * 0.3);

}

public void display() {

System.out.println("Pan Number\tName\tTax-Income\tTax");

System.out.println(pan + "\t" + name + "\t"

+ taxincome + "\t" + tax);

}

public static void main(String args[]) {

Employee obj = new Employee();

obj.input();

obj.cal();

obj.display();

Answered by sankarzaya8
0

Answer:

java programming language and compilation first platform first released by Microsoft technology

Similar questions