Question: ((Java)) 3. Write a program for computing taxes using arrays. Design a class named Tax to contain the following instance data fields: int filingStatus: One

((Java))
 ((Java)) 3. Write a program for computing taxes using arrays. Design

3. Write a program for computing taxes using arrays. Design a class named Tax to contain the following instance data fields: int filingStatus: One of the four tax-filing statuses: 0-single filer, 1-married filing jointly or qualifying widow(e)2 married filing separately, and 3-head of household. Use the public static constants SINGLE FILER (0), MARRIED_JOINTLY OR QUALIFYING WIDOW(ER) (1), MARRIED SEPARATE LY (2), HEAD_OF_HOUSEHOLD (3) to represent the statuses. int ] brackets: Stores the tax brackets for each filing status. doublel ] rates: Stores the tax rates for each bracket. double taxablelncome: Stores the taxable income. Provide the getter and setter methods for each data field and the getTax() method that returns the tax. Also, provide a default constructor and the constructor taxablelncome) Write a test program that uses the Tax class to print the 2001 and Tax(filingStatus, brackets, rates, 2009 tax tables for taxable income from $50,000 to S60,000 with intervals of $1,000 for all four statuses. The tax rates for the year 2009 are given in the table below. The tax rates for 2001 are shown in the table following 2009 2009 US. Federal Personal Tax Rates Marginal Single Married Filing Head of Married Filing Jointly or Qualifying Widowter) Tax Rate 10% SO- $8,350 SO-$16,700 SO-$8.350 S0- $11,950 15% 8,351- $16,701 -$67,900 8,351- 11,951- $33,950 $33,95O $45.500 25% $33,951 67,901-S137,050 $33,951 $45,501 S82.250 568,525 $117,450 28% $82.251- $137.051-$208,850 968.526- $117.451- $171,550 S104,425 $190.200 33% $171,551 208,851-$372,950 104,426 5190,201 $186,475 35% $372,951 372,951 $186,476

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!