12. a. Create a TaxReturn class with fields that hold a taxpayer's Social Security number, last name, first name, street address, city, state, zip code, annual income, marital status, and tax liability. 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 marital status. The following table shows the percentage of income that is taxed. INCOME (S) 0-20,000 20,001-50,000 50,001 and over SINGLE STATUS 15% 22% 30% to nottuseks kolay! - smugi MARRIED STATUS 14% 20% 28% In the TaxReturn class, also include a display method that displays all the TaxReturn data. Save the file as Tax Return.java. b. 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 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 each item of the input data is correct, create a TaxReturn object and then display its values. Save the file as Prepare Tax.java.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Java Programming: Question 12. Any help of input and ouput would be appreciated.
262
12.
CHAPTER 7 CHARACTERS, STRINGS, AND THE StringBuilder
10. Write a program that inserts parentheses, a space, and a dash into a String of 10 user-entered numbers
exactly 10 digits, display an error message. Continue to accept user input until the user enters 999. Save the e
as Phone NumberFormat.java.
11. Write an application that determines whether a phrase entered by the user is a palindrome. A palindrome
is a phrase that reads the same backward and forward without regarding capitalization or punctuation. For
example, Dot saw I was Tod, Was it a car or a cat I saw?, and Madam, I'm Adam are palindromes. Save the file as
Palindrome.java.
a. Create a TaxReturn class with fields that hold a taxpayer's Social Security number, last name, first
name, street address, city, state, zip code, annual income, marital status, and tax liability. 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 marital status. The following table
shows the percentage of income that is taxed.
INCOME (S)
0-20,000
20,001-50,000
50,001 and over
SINGLE STATUS
15%
22%
30%
o noituseks laslayt - smugia
MARRIED STATUS
14%
20%
28%
In the TaxReturn class, also include a display method that displays all the TaxReturn data. Save the
file as Tax Return.java.
aysiqalb vistehqoigge
b. Create an application that prompts a user for the data needed to create a TaxReturn. Continue to
tobio i prompt the user for data as long as any of the following are true:
elf doitdailgus as othWd
> The Social Security number is not in the correct format, with digits and dashes in the appropriate
positions-for example, 999-99-9999. bhow zoniand sil
o 11-om!
> The zip code is not five digits.
> The marital status does not begin with one of the following: S, s, M, or m. uoy 161 (onidba Isuh
>The annual income is negative.savolls fedt migongs sinw a tots)-sull 101 baste of A.IT
After each item of the input data is correct, create a TaxReturn object and then display its values. Save the file
ndt sichqoqgs
as Prepare Tax.java.
brow s Il site gil of latvnoo bas tous mod brows atqssoa teri moltsoilqgs ns ethW 8
solarev nitel gi9 srl Jasnoano
novs dilw anste brow & Il vantoso moedisais sigmaxs 107 vpyd bewollol bes
ebugging Exercises
ME
A
ach of the following files in the Chapter07 folder of your downloadable student files has syntax and/or logic
rors. In each case, determine the problem and fix the application. After you correct the errors, save each file
ing the same filename preceded with Fix. For example, DebugSeven Liava will become Find
1.
Transcribed Image Text:262 12. CHAPTER 7 CHARACTERS, STRINGS, AND THE StringBuilder 10. Write a program that inserts parentheses, a space, and a dash into a String of 10 user-entered numbers exactly 10 digits, display an error message. Continue to accept user input until the user enters 999. Save the e as Phone NumberFormat.java. 11. Write an application that determines whether a phrase entered by the user is a palindrome. A palindrome is a phrase that reads the same backward and forward without regarding capitalization or punctuation. For example, Dot saw I was Tod, Was it a car or a cat I saw?, and Madam, I'm Adam are palindromes. Save the file as Palindrome.java. a. Create a TaxReturn class with fields that hold a taxpayer's Social Security number, last name, first name, street address, city, state, zip code, annual income, marital status, and tax liability. 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 marital status. The following table shows the percentage of income that is taxed. INCOME (S) 0-20,000 20,001-50,000 50,001 and over SINGLE STATUS 15% 22% 30% o noituseks laslayt - smugia MARRIED STATUS 14% 20% 28% In the TaxReturn class, also include a display method that displays all the TaxReturn data. Save the file as Tax Return.java. aysiqalb vistehqoigge b. Create an application that prompts a user for the data needed to create a TaxReturn. Continue to tobio i prompt the user for data as long as any of the following are true: elf doitdailgus as othWd > The Social Security number is not in the correct format, with digits and dashes in the appropriate positions-for example, 999-99-9999. bhow zoniand sil o 11-om! > The zip code is not five digits. > The marital status does not begin with one of the following: S, s, M, or m. uoy 161 (onidba Isuh >The annual income is negative.savolls fedt migongs sinw a tots)-sull 101 baste of A.IT After each item of the input data is correct, create a TaxReturn object and then display its values. Save the file ndt sichqoqgs as Prepare Tax.java. brow s Il site gil of latvnoo bas tous mod brows atqssoa teri moltsoilqgs ns ethW 8 solarev nitel gi9 srl Jasnoano novs dilw anste brow & Il vantoso moedisais sigmaxs 107 vpyd bewollol bes ebugging Exercises ME A ach of the following files in the Chapter07 folder of your downloadable student files has syntax and/or logic rors. In each case, determine the problem and fix the application. After you correct the errors, save each file ing the same filename preceded with Fix. For example, DebugSeven Liava will become Find 1.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY