Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The United States federal personal income tax is calculated based on filing stat

ID: 3783437 • Letter: T

Question

The United States federal personal income tax is calculated based on filing status and taxable income. There are four filing statuses (in this program we’ll use only three): single filers, married filing jointly, and head of household. The tax rates vary every year. Table 1 shows the rates for 2016. If you are, say, single with a taxable income of $10,000, the first $9,075 is taxed at 10% and the other $925 is taxed at 15%. So, your tax is $1,046.25.

Table 1. 2014 Taxable Income Brackets and Rates

Rate

Single Filers

Married Joint Filers

Head of Household Filers

10%

$0 to $9,075

$0 to $18,150

$0 to $12,950

15%

$9,076 to $36,900

$18,151 to$73,800

$12,951 to $49,400

25%

$36,901 to $89,350

$73,801 to $148,850

$49,401 to $127,550

28%

$89,351 to $186,350

$148,851 to $226,850

$127,551 to $206,600

33%

$186,351 to $405,100

$226,851 to $405,100

$206,601 to $405,100

35%

$405,101 to 406,750

$405,101 to 457,600

$405,101 to $432,200

39.6%

$406,751+

$457,601+

$432,201+

Source: Internal Revenue Service

You are to write a java program to compute personal income tax. Your program should prompt the user to enter the filing status and taxable income and compute the tax. Enter 0 for single filers, 1 for married filing jointly, and 2 for head of household.

Note:

·         Project name: ProgrammingAssignment_1

·         Class name: ProgrammingAssignment_1

Table 1. 2014 Taxable Income Brackets and Rates

Rate

Single Filers

Married Joint Filers

Head of Household Filers

10%

$0 to $9,075

$0 to $18,150

$0 to $12,950

15%

$9,076 to $36,900

$18,151 to$73,800

$12,951 to $49,400

25%

$36,901 to $89,350

$73,801 to $148,850

$49,401 to $127,550

28%

$89,351 to $186,350

$148,851 to $226,850

$127,551 to $206,600

33%

$186,351 to $405,100

$226,851 to $405,100

$206,601 to $405,100

35%

$405,101 to 406,750

$405,101 to 457,600

$405,101 to $432,200

39.6%

$406,751+

$457,601+

$432,201+

Explanation / Answer

import java.util.*;
public class Programming_Asssesment_1 {
   static Scanner sc=new Scanner(System.in);
   public static void main(String[] args) {
       System.out.println("select filling status: ");
       System.out.println("0->single filer");
       System.out.println("1->maried filing jointly:");
       System.out.println("2->head of house hold:");
       int choice=sc.nextInt();
       switch(choice){
       case 0:singlefiling();
       break;
       case 1:maried_filling_jointly();
       break;
       case 2:head_of_house_hold();
       break;
       default:
           System.out.println("entered invalid choice:");
           break;
       }

   }

   private static void head_of_house_hold() {
       System.out.println("ur in head of house hold filling:");
       System.out.println("please enter taxable income:");
       int income=sc.nextInt();
       int tax=0;
       if(income>0 && income<=12950)
           tax=income/10;
         
       else if(income>=12951 && income<=49400)
           tax=income/15;
               else   if(income>=49401 && income<=127550)
                   tax=income/25;
               else   if(income>=127551 && income<=206600)
                   tax=income/28;
                       else   if(income>=206601 && income<=405100)
                           tax=income/33;
                       else   if(income>=405101 && income<=432200)
                           tax=income/35;
                       else
                           tax=income/39;
                      
             
       int final_re=income-tax;
       System.out.println("income is: "+income);
       System.out.println("tax is: "+tax);
       System.out.println("final_sal: "+final_re);
      
      
   }

   private static void maried_filling_jointly() {
       System.out.println("ur in maried_ filling:");
       System.out.println("please enter taxable income:");
       int income=sc.nextInt();
       int tax=0;
       if(income>0 && income<=18150)
           tax=income/10;
         
       else if(income>=18151 && income<=73800)
           tax=income/15;
               else   if(income>=73801 && income<=148850)
                   tax=income/25;
               else   if(income>=148851 && income<=226850)
                   tax=income/28;
                       else   if(income>=226851 && income<=405100)
                           tax=income/33;
                       else   if(income>=405101 && income<=457600)
                           tax=income/35;
                       else
                           tax=income/39;
                      
             
       int final_re=income-tax;
       System.out.println("income is: "+income);
       System.out.println("tax is: "+tax);
       System.out.println("final_sal: "+final_re);
      
      
   }

   private static void singlefiling() {
       System.out.println("ur in single filling:");
       System.out.println("please enter taxable income:");
       int income=sc.nextInt();
       int tax=0;
       if(income>0 && income<=9075)
           tax=income/10;
         
       else if(income>=9076 && income<=36900)
           tax=income/15;
               else   if(income>=36901 && income<=89350)
                   tax=income/25;
               else   if(income>=89351 && income<=186350)
                   tax=income/28;
                       else   if(income>=186351 && income<=405100)
                           tax=income/33;
                       else   if(income>=405101 && income<=406750)
                           tax=income/35;
                       else
                           tax=income/39;
                      
             
       int final_re=income-tax;
       System.out.println("income is: "+income);
       System.out.println("tax is: "+tax);
       System.out.println("final_sal: "+final_re);
      
   }

}



output:
select filling status:
0->single filer
1->maried filing jointly:
2->head of house hold:
2
ur in head of house hold filling:
please enter taxable income:
100000
income is: 100000
tax is: 4000
final_sal: 96000

output:
0->single filer
1->maried filing jointly:
2->head of house hold:
1
ur in maried_ filling:
please enter taxable income:
100000
income is: 100000
tax is: 4000
final_sal: 96000

output:
select filling status:
0->single filer
1->maried filing jointly:
2->head of house hold:
0
ur in single filling:
please enter taxable income:
100000
income is: 100000
tax is: 3571
final_sal: 96429

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote