Computers and Technology
Computers and Technology, 07.06.2021 18:40, diana156

Okay, guys, I know this one will be very hard however while trying to finish this assignment I got overwhelmed and lost by the sheer size of it! Alrighty! Here are the instructions:
Modify the TaxReturn class with fields that hold a taxpayer’s Social Security number (snn), last name (last), first name (first), street address (address), city (city), state (state), zip code (zipCode), annual income (income), marital status (status), and tax liability (tax). Include a constructor that requires arguments that provide values for all the fields other than the tax liability. The constructor calculates the tax liability based on annual income and the percentages in the following table.

Income Single Married
0 - 20,000 15% 14%
20,001 - 50,000 22% 20%
50,001+ 30% 28%

In the TaxReturn class, also include a display method that displays all the TaxReturn data.

Implement the PrepareTax application that prompts a user for the data needed to create a TaxReturn. Continue to prompt the user for data as long as any of the following are true:

• The Social Security number is not in the correct format, with digits and dashes in the appropriate positions—for example, 999-99-9999.

• The zip code is not five digits.

• The marital status does not begin with one of the following: S, s, M, or m.

• The annual income is negative.

After all the input data is correct, create a TaxReturn object and then display its values.

An example of the program is shown below:

Enter your Social Security number
999-99-9999
Enter your first name
Jane
Enter your last name
Doe
Enter your address
1961 Mulberry Street
Enter your city
Springfield
Enter your state
Massachusetts
Enter your Zip code
01101
Enter marital status
Single
Enter your annual income
20000
Taxpayer ssn: 999-99-9999 Jane Doe
1961 Mulberry Street
Springfield, Massachusetts 01101
Marital status: S
Income: $20000.0 Tax: $3000.0

I also want to point out that this assignment has two different files with one being PrepareTax. java and the other being ReturnTax. java!

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 18:00, rajenkins79
What is stored in str after the following code executes? string str = "computer science"; int i = 0; while (i < 8) { if (str. indexof("m") < i) { str = str. substring(0, 2) + str; } i += 2; } computer science cocomputer science cococomputer science cocococomputer science computer scienceco
Answers: 3
image
Computers and Technology, 22.06.2019 05:30, xbeatdroperzx
Gerard is currently working as an entry-level customer support technician, but he would like to someday become a software developer. what is the best first step to understand what he should do? ask his manager for a new job or at least a job recommendation study graphic design in order to obtain the necessary skills use career resources to investigate what skills and education are required work part-time as an entry-level web developer question 13 (true/false worth 6 points) (08.03 lc) career resources are used to explore career options and find career information. true false question 14(multiple choice worth 6 points) (08.01 mc) classify the following skills: writing html code, evaluating color theory, using design principles. hard skills interpersonal skills people skills soft skills question 15 (true/false worth 6 points) (08.03 lc) a mentor is a person who is advised, trained, or counseled by a trusted mentee. true false
Answers: 2
image
Computers and Technology, 23.06.2019 02:50, bfell92
There’s only one game mode that stars with the letter ‘e’ in cs: go. which of the options below is it?
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, ayoismeisjjjjuan
The camera still is bad even with the new iphone xr and especially in low light it is even worst because you can see the pixels more if its in low light. if all you apple customers want apple to fix this then lets fill there feedback with complaints about the can apple do to fix this issue?
Answers: 1
Do you know the correct answer?
Okay, guys, I know this one will be very hard however while trying to finish this assignment I got o...

Questions in other subjects:

Konu
Mathematics, 02.04.2020 01:03
Konu
Biology, 02.04.2020 01:03