Question: Problem Descriptions: PLEASE HELP!! Suppose we are to test an income tax calculation system. An input to the system contains two numbers, (X, Y). If
Problem Descriptions:
PLEASE HELP!!
Suppose we are to test an income tax calculation system. An input to the system contains two numbers, (X, Y). If X = 1, it means it is for single filing; X = 2, for joint" filing; other numbers are invalid input. Y represents the income of the filing and must be an integer positive number.
The tax calculation rule follows.
For single filing:
Income range Tax rate 0-$10K (inclusive) 0 $10K - $60K (incl. $60K) 10% $60K - $120K (incl. $120K) 20% $120K - $180K (incl. $180K) 30% $180K and above 40%
For joint filing
Income range Tax rate 0-$20K (inclusive) 0 $20K - $120K (incl. $120K) 10% $120K - $240K (incl. $240K) 20% $240K - $360K (incl. $360K) 30% $360K and above 40%
For example, with an input of (2, 135K), the calculation would be:
First $20K, no tax ($120K - $20K) * 0.1 = $10K ($135K - $120K) * 0.2 = $3K
The total tax would be $3K + $10K= $13K
Design test cases to cover all boundaries for this system. Some invalid test cases must also be designed. Note: a test case should contain both input and expected output, i.e., ((X, Y), tax).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
