Question: Java Create a TaxPay class with fields that hold a taxpayers Social Security number, last name, first name, street address, city, state, zip code, annual

Java

Create a TaxPay class with fields that hold a taxpayers Social Security number, last name, first name, street address, city, state, zip code, annual income, tax. Include a constructor that requires arguments that provide values for all the fields except tax. The constructor calculates the tax liability based on annual income and the percentages in the following table. Include a display method that displays all the information data. Save the file as TaxPay.java. Annual Income ($) Tax Rate (%) 0-41725 5.06 41725.01-83451 7.70 83451.01-95812 10.50 95812.01-116344 12.29 116344.01-157748 14.70 157748.01-220000 16.80 220000-More 20.50 Create an application that prompts a user for the data needed to create a TaxPay for a resident. 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 six digits with format A9A9B9. The annual income is negative. After all the input data is correct, create a TaxPay object and then display its values. Save the file as TaxMain.java.

outputJava Create a TaxPay class with fields that hold a taxpayers SocialSecurity number, last name, first name, street address, city, state, zip code,annual income, tax. Include a constructor that requires arguments that provide values

Console X TaxMain [Java Application] C:\Program Files\Java Enter Social Security number 123-11111111 Enter Social Security number 2 Console X TaxMain [Java Application] C:\Program Files Enter Social Security number 111-11-1111 Enter Annual Income 34000 Enter Zip Code D4D555 Enter Social Security number e Console X TaxMain [Java Application) C:\Program FilesVavajo Enter Social Security number 232-88-9999 Enter Annual Income 850000 Enter Zip Code D3E5R5 Enter Last name John Enter First name Mary Enter Street name Robert Enter city name Abbotsford Enter state name BC Details of the Tax payer Social Security Number: 232-88-9999 Last name: John First Name: Mary Street: Robert City: BC State: D3E5R5 Annual Income: 850000.0 Tax: 17425.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create this Java program you need to define two classes TaxPay and TaxMain Below Ill provid... View full answer

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!