Question
Design a class namedCalcTaxto contain the following: Constructors: no-arg CalcTax (filingStatus, taxableIncome) Data fields: int filingStatus Stores one of the four tax-filing statuses: 1 single
Design a class namedCalcTaxto contain the following:
Constructors:
- no-arg
- CalcTax(filingStatus, taxableIncome)
Data fields:
intfilingStatusStores one of the four tax-filing statuses:
- 1 single filer
- 2 married filing jointly
- 3 married filing separately
- 4 head of household.
double [][]bracketInfo Stores the tax bracket for given filing status.
String []fileNames Stores reference to a String array that is created in the driver file.
doubletaxableIncomeStores the taxable income.
Methods:
Provide thegetterandsettermethods forfilingStatus, taxableIncomeandfileNames(name them as talked about in class)
getTax(grossIncome)method that receives the gross income as a double numeric value and returns the actual tax as a integer numeric value.
convert2double(numericString, tokenString)method that receives 2 Strings and returns a double numeric value. This is only to be used in the Tax class.
menu()method that outputs a menu that must look like this... Enter 1 if your status is SINGLE Enter 2 if your status is MARRIED FILING SEPARATE Enter 3 if your status is MARRIED FILING JOINTLY Enter 4 if your status is HEAD OF HOUSEHOLD
Files needed to use this class:
single.txtDownload single.txt marriedSeparate.txtDownload marriedSeparate.txt marriedJointly.txtDownload marriedJointly.txt headHousehold.txtDownload headHousehold.txt
The following link will show you more information that you will need to do the tax calculation... scroll down to this section
"2021 Tax Brackets and Tax Rates (for filing in 2022)"
https://turbotax.intuit.com/tax-tips/irs-tax-return/current-federal-tax-rate-schedules/L7Bjs1EAD
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started