To satisfy our first requirements, we need to find an
input that causes the execution of this statement. Because this statement
is executed only when result is greater than zero, our
test requirement is that a plus b must be greater than
0. When this is satisfied, this statement is executed therefore
any test case that implements this specification will cause the execution
of this statement. Similarly if we want to cover this statement
which is our second requirement we need to have a result
that is less than 0. Again, the result is equal
to a plus b, so all we need to do
is find the test case such that a plus b
is less than 0. So this is pretty straight forward.