Hello I need help with this java tax assignment it is asking to Write the Java code needed to perform the following:• Calculate state withholding tax at 6.0%, and calculate fed-eral withholding tax at 25.0%.• Calculate dependent deductions at 2.0% of the employee’s salary for each dependent.

public class Payroll.Java

public static void main(String args[])
    double salary = 1250.00;
    double stateTax;
    double federalTax;
    double numDependents = 2;
    double dependentDeduction;
    double totalWithholding;
    double takeHomePay;

    // Calculate state tax here. 

    System.out.println("State Tax: $" + stateTax);
    // Calculate federal tax here. 

    System.out.println("Federal Tax: $" + federalTax);
    // Calculate dependant deduction here.

    System.out.println("Dependents: $" + dependentDeduction);
    // Calculate total withholding here.

    // Calculate take home pay here.

This thread was started two times. Follow the answers already given at the other thread.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.