scar naa ra imuha project sa java

import javax.swing.JOptionPane;
public class USAtaxes
{
public static void main(String[] args)
{

int incometax;
//String status;
int a,b;
double t1,t2,t3,t4,t5,t6;
double mtr1=.10, mtr2=.15, mtr3=.25, mtr4=.28, mtr5=.33, mtr6=.35;


JOptionPane.showMessageDialog(null, "TAXES\n");
String tax=JOptionPane.showInputDialog(null, "Enter your tax income:\n\n");

incometax=Integer.parseInt(tax);
String status = JOptionPane.showInputDialog(null, "1. Single\n2. Married Filing Jointly\n3. Married Filing Shortly\n4. Head of Household:    ");

a= Integer.parseInt(status);
switch(a)
{
case 1:
   
//if(a==1)
    {
    JOptionPane.showMessageDialog(null, "Single Status");
    /*t1=incometax*mtr1;
    t2=incometax*mtr2;
    t3=incometax*mtr3;
    t4=incometax*mtr4;
    t5=incometax*mtr5;
    t6=incometax*mtr6;
    JOptionPane.showMessageDialog(null, "Your taxes are \n \n \n"+t1 +t2 +t3 +t4 +t5+ t6);
    */
    if(incometax>=0&&incometax<=8350)
   
                {
                    t1=incometax*mtr1;
                    JOptionPane.showMessageDialog(null, "You're tax is:" + t1);
               
               
                }
   
   
    else if(incometax>=8351&&incometax<=33950)
       
                {
                    //t2=incometax*mtr2;
                    incometax=incometax-8350;
                    t2=incometax*mtr2+835;
                    JOptionPane.showMessageDialog(null, "You're tax is:" + t2);
                    break;
                }

   
    else if(incometax>=33951&&incometax<=82250)
       
                {
                    incometax=incometax-33950;
                    t3=incometax*mtr3+5092.5;
                    JOptionPane.showMessageDialog(null, "You're tax is:" + t3);
                    break;
                }

   
    else if(incometax>=82251&&incometax<=171550)
       
                {
                    incometax=incometax-82250;
                    t4=incometax*mtr4+20562.5;
                    JOptionPane.showMessageDialog(null, "You're tax is:" + t4);
                    break;
                }

    else if(incometax>=171551&&incometax<=372950)
       
                {
                    incometax=incometax-171550;
                    t5=incometax*mtr5+48034;
                    JOptionPane.showMessageDialog(null, "You're tax is:" + t5);
                    break;
                }

   
    else if(incometax>=372951)
       
                {
                    incometax=incometax-372950;
                    t6=incometax*mtr6+123073.5;
                    JOptionPane.showMessageDialog(null, "You're tax is:" + t6);
                    break;
                }

   
   
    else
                {
                    JOptionPane.showMessageDialog(null, "wrong input");
                    break;
                }
   
   
    }


case 2:
   
    {
    JOptionPane.showMessageDialog(null, "Married Filing Jointly Status");
   
    if(incometax>=0&&incometax<=16700)
       
        {
            t1=incometax*mtr1;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t1);
            break;
        }


else if(incometax>=16701&&incometax<=67900)

        {
       
            incometax=incometax-16700;
            t2=incometax*mtr2+1670;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t2);
            break;
        }


else if(incometax>=67901&&incometax<=137050)

        {
            incometax=incometax-137050;
            t3=incometax*mtr3+10185;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t3);
            break;
        }


else if(incometax>=137051&&incometax<=208850)

        {
            incometax=incometax-82250;
            t4=incometax*mtr4+34262.5;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t4);
            break;
        }

else if(incometax>=208851&&incometax<=372950)

        {
            incometax=incometax-171550;
            t5=incometax*mtr5+58478;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t5);
            break;
        }


else if(incometax>=372951)

        {
            incometax=incometax-372950;
            t6=incometax*mtr6+123073.5;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t6);
            break;
        }



else
        {
        JOptionPane.showMessageDialog(null, "wrong input");
        break;
        }


   
    }


case 3:

    {
        JOptionPane.showMessageDialog(null, "Married Filing Separately Status");
   

   
    if(incometax>=0&&incometax<=8350)
       
        {
            t1=incometax*mtr1;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t1);
            break;
        }


else if(incometax>=8351&&incometax<=33950)

        {
       
            incometax=incometax-8350;
            t2=incometax*mtr2+835;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t2);
            break;
        }


else if(incometax>=33951&&incometax<=68525)

        {
            incometax=incometax-33950;
            t3=incometax*mtr3+5092.5;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t3);
            break;
        }


else if(incometax>=68525&&incometax<=104425)

        {
            incometax=incometax-68525;
            t4=incometax*mtr4+17131.25;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t4);
            break;
        }

else if(incometax>=104426&&incometax<=186475)

        {
            incometax=incometax-104425;
            t5=incometax*mtr5+29239;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t5);
            break;
        }


else if(incometax>=186476)

        {
            incometax=incometax-186475;
            t6=incometax*mtr6+61536.75;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t6);
            break;
        }



else
        {
        JOptionPane.showMessageDialog(null, "wrong input");
        break;
        }


   
    }


case 4:


    {
        JOptionPane.showMessageDialog(null, "Head of Household Status");
       


    if(incometax>=0&&incometax<=11950)
   
        {
            t1=incometax*mtr1;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t1);
            break;
        }


    else if(incometax>=11951&&incometax<=45500)

        {
   
            incometax=incometax-11950;
            t2=incometax*mtr2+1195;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t2);
            break;
        }


    else if(incometax>=45501&&incometax<=117450)

        {
            incometax=incometax-45500;
            t3=incometax*mtr3+6825;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t3);
            break;
        }


    else if(incometax>=117451&&incometax<=190200)

        {
            incometax=incometax-117450;
            t4=incometax*mtr4+29362.5;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t4);
            break;
        }

    else if(incometax>=190201&&incometax<=372950)

        {
            incometax=incometax-190200;
            t5=incometax*mtr5+53256;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t5);
            break;
        }


    else if(incometax>=372951)

        {
            incometax=incometax-372950;
            t6=incometax*mtr6+123073.5;
            JOptionPane.showMessageDialog(null, "You're tax is:" + t6);
            break;
        }



    else
        {
       
        JOptionPane.showMessageDialog(null, "wrong input");
        break;
        }




    }
}
}
}
}