So yeah, I'm stuck on a homework problem...
Basically we have this piece of code
and the following task:
Attached to this specification is a copy of the code for a Java method. Your task is to design test cases to exercise the method using the Multiple Condition Coverage criteria.
You must produce the following documentation:
• The set of truth tables arising out of your analysis of the code;
• A completed Test Plan – see the notes.
I've never come accross testing like this before, only really done Blackbox D:
Can anyone help me out? :)
Basically we have this piece of code
Code
public String checkValues(int i, int j, int k)
{
int match;
if (!( (i>0) && (j>0) && (k>0) ))
return "\nInvalid sides for triangle \n";
else
if ((i>=j+k) || (j>=k+i) || (k>=i+j))
return "\nNot a triangle\n";
else
{
match = 0;
if (i==j)
match = match + 1;
if (j==k)
match = match + 1;
if (k==i)
match = match + 1;
if (match == 0)
return "\nScalene triangle\n";
else
if (match == 1)
return "\nIsoceles triangle\n";
else
return "\nequilateral triangle\n";
}
}
}and the following task:
Attached to this specification is a copy of the code for a Java method. Your task is to design test cases to exercise the method using the Multiple Condition Coverage criteria.
You must produce the following documentation:
• The set of truth tables arising out of your analysis of the code;
• A completed Test Plan – see the notes.
I've never come accross testing like this before, only really done Blackbox D:
Can anyone help me out? :)

