Question: I need help creating two java codes. For this Assignment, submit the following program: Create a TaxReturn class with fields that hold a taxpayers Social

I need help creating two java codes.

For this Assignment, submit the following program:

Create a TaxReturn class with fields that hold a taxpayers Social Security number, last name, first name, zip code, annual income, marital status and the number of vehicles owned. The program will calculate the tax liability based on annual income and the percentages in the following table:

Marital Status

TOTAL Income in U.S. Dollars

Single

Married

015000

15%

14%

1500149001

25%

21%

49002 and up

35%

31%

The TaxReturn class should have the CalculateTax method to calculate tax liability.

Note: the Tax class does not have the main method and can be used for objects instantiations only.

Create ShowTax driver class with the main method. ShowTax class instantiates myTax object of the TaxReturn type and sets up its fields to values entered by a user.

When accepting a users input, prompt the user to enter the data needed to output a summary of the information gathered. Make sure to ask for the information in the format you would like it from the user and adhere to the following:

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

No negative incomes are allowed, so the value must be above zero

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.

In the .java files: add the comments on code blocks, their scope and functionality as you write codes in the TaxReturn class and ShowTax class.

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!