I will have to be creating a TaxReturn class with fields that hold a taxpayer's Social Security number, last name, first name, zip code, annual income, marital status and the number of vehicles owned. This program will have to be calculating the tax liability based on annual income and the percentages in the table below. The TaxReturn class should have the CalculateTax method to calculate tax liability. I will then have to start creating a ShowTax driver class with the main method. ShowTax class instantiates myTax object of the TaxReturn and sets up its fields to values entered by a user. This data will then need to be retrieved from the object fields and displayed. When accepting a user's input, I will have to prompt the user to enter the data needed to output a summary of the information gathered. I will be having to ask for the information in the format I would like it inputted from the user and it must abide by the following rules: If the Social Security number contains more or less than 10 digits then reprompt for the information again, Marital status must be either 'S' or 's' or 'M' or 'm', and No negative incomes are allowed, so the value must be above zero if such input is attempted. I will have to be using the StringBuilder class to format the output results. I will have to display the output for each data set making use of the JOptionPane class using the data in the sets below.
Data set 1 to input:
Social Security number 888-99-5623, last name Jones, first name Michael, zip code 12345, annual income 73564, marital status m, number of vehicles owned 5.
Data set 2 to input:
Social Security number 899-99-5624, last name Jackson, first name Jane, zip code 62354, annual income 23564, marital status M, number of vehicles owned 1.
Data set 3 to input:
Social Security number 522-97-2341, last name Smith, first name Darrell, zip code 20156, annual income 60270, marital status M, number of vehicles owned 2.
Can you please assist me with this code? I'm constantly running into errors.
Thanks in advance...
Recently Asked Questions
- I need help on this discussion. What happened to the lyme disease vaccine? Why is the lab testing not definitive? What do we do for patients with chronic
- Please describe to me in simple terms innovations in location-based social media(English is my second language).
- Please explain to me the negative effects of the Roman conquests.