Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a detailed test plan with sample data. You do not have to calculate expected results, but please explain why each test case was chosen

image text in transcribedCreate a detailed test plan with sample data. You do not have to calculate expected results, but please explain why each test case was chosen as related to the problem. Also include a description of any error checking on the input values that you should do. You may need more or FEWER rows than are shown.

image text in transcribed

INSTRUCTIONS Complete the design, test table, and coding for a FederalTax class. For federal tax purposes, a person is identified by their social security number, a String in the form "AAA-GG-SSSS". The first three-digit field is called the "area number". The central, two-digit field is called the "group number". The final, four-digit field is called the "serial number". Valid Area Numbers are 001 through 649. Valid Group Numbers are 01 through 99. Valid Serial Numbers are 0001 through 9999. Use 001-01-0001 for a default SSN. The federal income tax that a person pays is a function of the person's taxable income (default value 0). The following table conatains formulas for computing a single person's tax. Bracket Taxable Income Tax Pald 1 $53,500 or less 15% 2 More than $53,500 but $250,000 or less $12,107 plus 31% of any taxable income over $53,500 3 Over $250,000 $79,772 plus 39.6% of any taxable income over $250,000 Create a FederalTax class with necessary instance attributes, instance methods, class constants, class attributes and class methods: Constructors - default and non-default Accessors - returns values of the instance variables Mutators - assigns new values to the instance variables, including error checking on the arguments. All mutators should be private as a user cannot change their SSN or income after creating a FederalTax object. toString method that returns a String with messages and values of the instance variables as shown. Note the formatting. SSN: 001-01-0001 Taxable Income: $0.00 taxBracket() - uses the above table to compute and return the tax bracket taxPaido - uses the above table to compute and return the tax paid, a real number rounded to 2 decimal places. You also want the class to keep track of the Federal Tax object that has the highest tax paid. Provide a class method getHighestTaxObject() to return that object Test Case Reason Sample Valid Data Error Checking Reason Sample Invalid Data

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions