subject

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!

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 22.06.2019 19:40
Solve the following javafx application: write a javafx application that analyzes a word. the user would type the word in a text field, and the application provides three buttons for the following: - one button, when clicked, displays the length of the word.- another button, when clicked, displays the number of vowels in the word.- another button, when clicked, displays the number of uppercase letters in the word(use the gridpane or hbox and vbox to organize the gui controls).
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
You know the right answer?
Okay, guys, I know this one will be very hard however while trying to finish this assignment I got o...
Questions
question
Mathematics, 16.10.2020 16:01
question
English, 16.10.2020 16:01
question
English, 16.10.2020 16:01
question
Chemistry, 16.10.2020 16:01
question
Mathematics, 16.10.2020 16:01
question
Mathematics, 16.10.2020 16:01
Questions on the website: 13722360