# Due 4/16/2015 with 10% penalty for late paper --- 0 after 4/21/2015 class period

```SWE 3643 Assignment 3
1) This assignment comes in 3 parts (see below for Parts A,B &amp; C); total is ---50 points ---- (form a team of approximately ~4 partners by March 31)
2) (Written part ---- Due 4/16/2015 class period; 10% late penalty--- but after
4/21/2015 class period the score will be 0)
3) (in-class presentations 4/21/2015 thru 4/23/2015)
Consider the following problem: (Read the whole assignment)
Write a program that will read two inputs, income (inc) and number of dependents
(dep). Based on the income, the program will calculate the tax-amount according to
the following table.
income
0 &lt; inc ≤ 20000
20000 &lt; inc ≤ 30000
30000 &lt; inc ≤ 40000
40000 &lt; inc ≤ 50000
50000 &lt; inc ≤ 90000
90000 &lt; inc
Tax-amount (% of income)
4%
5%
6%
7%
10 %
13 %
Furthermore, if there is any dependent, then the tax-amount is further decreased
accordingly.
Dependent = 1
10%
2 ≤ dependent ≤ 3
25%
Dependents &gt; 3
40%
Print out three items: income, # of dependents, and tax amount.
(Part A - 15 points)
Using the requirements statements above, design and show all your test cases using
various techniques learned for Functional or Black-box testing (at least include
boundary-value and decision-table techniques).
(Part –B – 15 points)
Looking a the pseudo code on the next page, design and show all your test cases
using various techniques learned for Structural or White-box testing (at least
branch coverage, linearly independent paths, and define-use paths techniques).
(Part – C – 20 points)
Convert the pseudo code to your favorite language code, get it to compile correctly,
execute your test cases from part A and B against the code, record all the errors
found, and provide an in-class report on your testing results. The in-class report
should provide: i) a summary list of your test cases in Part A and test cases in Part
B, ii) execution test results (numbers passed and numbers failed – with severity), iii)
any fixing or re-test performed, iv) a discussion on the “effectiveness” of your test
cases, including how do you know when to stop testing and v) a discussion of your
experiences (e.g. what was difficult to design; how much effort did it take to design
test cases, execute the test cases and record the material; what was easy and what
was not, etc.). (Look at Lecture Notes on Test Planning for hint of Test Result Report.)
Also turn your report into a ppt presentation for in class presentation.
Possible Pseudo –Code (that may contain defects caused by my human errors):
start program
bracket = 0
if (0 &lt; inc ≤ 20000) bracket = 1
else if ( 20000 &lt; inc ≤ 30000) bracket = 2
else if (30000 &lt; inc ≤ 40000) bracket = 3
else if (40000 &lt; inc ≤ 50000) bracket = 4
else if ( 50000 &lt; inc ≤ 90000) bracket = 5
else bracket = 6
switch (bracket) {
case 1: tax = inc * .04
break
case 2: tax = inc * .05
break
case 3: tax = inc * .06
break
case 4: tax = inc * .07
break
case 5: tax = inc * .10
break
case 6: tax = inc * .13
break
default: output (“ something is wrong with the income bracket computation”)
}
if (dep = 1) tax = tax - (.1 * tax)
else if ( 2 ≤ dep ≤ 3 ) tax = tax – (.25* tax)
else if ( 3&lt; dep ) tax = tax – (.4 * tax)
else tax = tax
output ( “income” = inc, “dependent’ = dep, “tax” = tax )
end program
```