Need to add arrays to the program - federal income tax

Assignment Help JAVA Programming
Reference no: EM131588726

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);

    }

}

Reference no: EM131588726

Questions Cloud

Calculate p and js adjusted gross income : P and J are a married couple with the following items of income for 2014: Calculate P and J's 2014 Adjusted Gross Income (AGI) as well as their taxable income
Determine displacement and shear force : Two 200 mm x 200 mm square bars are joined through a pin and loaded as shown in Figure. Determine displacement, shear force, and bending moments.
Search engine optimization plan : In addition to the e-Business Plan template under the Search Engine Optimization Plan section heading, add a Search Engine Optimization Plan.
Discuss neurotransmitter in the central nervous system : What is the most common class of neurotransmitter in the central nervous system
Need to add arrays to the program - federal income tax : depends on the choices made by the user. You are not required to check to make sure that the user inputs a valid Roman numeral for this assignment
Key innovation of crypto-currency : It is well known that the key innovation of crypto-currency (such as Bitcoin, Ethereum) is distributed consensus protocol.
A description of all conditions for mental illness : Which of the following is included in the DSM-5, A description of all conditions for mental illness
Define the lower portion of an aluminum step bracket : The lower portion of an aluminum step bracket, shown in Figure, is subjected to a uniform pressure of 20 N/mm2. The left end is fixed and the right end is free.
Explain potential threats that encountered during market : Explain Potential threats that encountered during market introduction and Specific critical success factors to determine success of deployment..

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd