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

  When are stubs & skeletons created for my ejb components

When are stubs & skeletons created for my EJB components? is it at development time, deployment time or run time?

  Explain java stack and heap

I am posting the questions as reference, but I am requesting information about how to do these types of questions generally, not to have them done for me.

  What is a generic subprogram in java

How do you describe as a type in C++ a pointer to a function that takes two ints as arguments and returns a double. What is a generic subprogram in Java. What are its advantages

  Java application modeled after the game of hangman

Creating a Java application modeled after the game of hangman, where a user must guess a hidden word or phrase in a limited number of guesses.

  Write java codes to implement the viterbi algorithm

In this programming assignment, you are asked to write Java codes to implement the Viterbi algorithm for HMM Tagging

  We will simulate a very simple network by having a process

we will simulate a very simple network by having a process correspond to a node in the network and files correspond to

  What are the constraints on the argument values

What makes a program easy to modify and describe the order of magnitude of the following code section using Big(O) notation.

  Create the mouse program

Question 1: Create the Mouse program. Test it with interesting data. Question 2: Modify the MouseDriver program you just created in Question #1. Currently, it uses the same value of growthRate for both mice. Change the program so it accepts a d..

  Write a version of sumpairs

Write a version of sumPairs  that sums each component of the pairs separately, returning a pair consisting of the sum of the first components and the sum of the second components. So basically [(3,1)(10,3)] would return (13,4).

  Determine if strings are equal

Complete the recursive method match in the code below which will determine whether or not two strings match.

  Write a recursive method called maxsum

write a recrusive method called maxSum that accepts a list of integers. L, and an integer limit n as parameters and use backtracking to find the maximum sum that can be generated by adding elements of L that do not exceed n.

  Create an invoice class with four attributes

Create an Invoice class with 4 attributes: PartNumber (type int), PartDescription (type String), Quantity (type int), and Price (type double)

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