Question: Listing 3.5, ComputeTax.java, gives the source code to compute taxes for single filers. Complete Listing 3.5 to compute the taxes for all filing statuses. Listing
Listing 3.5, ComputeTax.java, gives the source code to compute taxes for single filers. Complete Listing 3.5 to compute the taxes for all filing statuses.
Listing 3.5
![1 import java.util.Scanner; 3 public class ComputeTax { public static void main(String]](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2022/11/636a70cd5e98c_077636a70cd4e7e1.jpg)

1 import java.util.Scanner; 3 public class ComputeTax { public static void main(String] args) { 4 // Create a Scanner Scanner input - new Scanner (System.in); 5 // Prompt the user to enter filing status System.out.print("(0-single filer, 1-married jointly or "qualifying widow(er), 2-married separately, 3-head of " "household) Enter the filing status: "); 10 11 12 int status - input.nextInt(); 13 14 15 16 17 18 19 20 21 22 23 // Prompt the user to enter taxable income System.out.print("Enter the taxable income: "); double income - input.nextDouble(); // Compute tax double tax - 0; if (status -- 0) { // Compute tax for single filers if (income
Step by Step Solution
3.30 Rating (171 Votes )
There are 3 Steps involved in it
To generate the tax depending upon the entered status of teh user ... View full answer
Get step-by-step solutions from verified subject matter experts
