Create a TaxReturn class with fields that hold a taxpayers Social Security number, last name, first name,
Question:
In the TaxReturn class, also include a display method that displays all the TaxReturn data. Save the file as TaxReturn.java. Create an 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 positionsfor 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. Save the file as PrepareTax.java.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: