Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 273 Weeks Ago, 4 Days Ago |
Questions Answered: | 1850 |
Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
Hi, I need to add arrays to the below program. The program below works, but I'm not sure where to add arrays.Â
Â
Â
import java.util.Scanner;
/**
 *
 * @author
 */
public class TaxApplication {
   /**
    * @param args the command line arguments
    */
   public static void main(String[] args) {
       Scanner input = new Scanner(System.in);    // to read the input
       double wageSalTips;
       double taxableInterest;
       double unempCompPerFunds;
       double adjustedIncome;
       double taxableIncome;
       double federalIncomeTax;
       double EIC;
       double totalPayments;
       double tax;
       double healthcare;
       double totalTax;
       double result;
       int line5 = 10150;
       System.out.println("Welcome to the 1040EZ Tax Form Application");
       System.out.println("1 Wages, salaries, and tips. This should be shown in box 1 of your Form(s) W-2. Attach your Form(s) W-2.");
       wageSalTips = input.nextDouble();
       System.out.println("2 Taxable interest.");
       taxableInterest = input.nextDouble();
       System.out.println("3 Unemployment compensation and Alaska Permanent Fund dividends.");
       unempCompPerFunds = input.nextDouble();
       adjustedIncome = wageSalTips + taxableInterest + unempCompPerFunds;
       System.out.println("4 Add lines 1, 2, and 3. This is your adjusted gross income. $" + adjustedIncome);
       System.out.println("5 If no one can claim you (or your spouse if a joint return), enter $10,150 if single; $20,300 if married filing jointly. See back for explanation. " + line5);
       taxableIncome = adjustedIncome - line5;
       System.out.println("6 Subtract line 5 from line 4. If line 5 is larger than line 4, enter -0-. This is your taxable income. $" + taxableIncome);
       System.out.println("7 Federal income tax withheld from Form(s) W-2 and 1040.");
       federalIncomeTax = input.nextDouble();
       System.out.println("8 Earned income credit (EIC)");
       EIC = input.nextDouble();
       totalPayments = federalIncomeTax + EIC;
       System.out.println("9 Add lines 7 and 8. These are your total payments and credits. $" + totalPayments);
       tax = taxableIncome * 0.15;
       System.out.println("10 Tax. Multiply Line 6 by 0.15. $" + tax);
       System.out.println("11 Health care: individual responsibility");
       healthcare = input.nextDouble();
       totalTax = tax + healthcare;
       System.out.println("12 Add lines 10 and 11. This is your total tax. $" + Math.round(totalTax * 100.0) / 100.0);
       result = totalPayments - totalTax;
       System.out.println("13 Subtract line 12 from line 9. If result is positive, it is your refund. If result is negative, it is the amount you owe. $" + Math.round(result * 100.0) / 100.0);
   }
}
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I