0
4.4kviews
A program reads three numbers n1,n2,n3 in the range - 100 to 100 and prints the smallest number. Design test cases for this program using equivalence class testing technique
1 Answer
1
209views

int n1,n2,n3;

if(n1<n2 &amp;&amp;="" n1<n3)<="" p="">

{

System.out.println("The smallest number is "+n1);

}

else if(n1<n3)< p="">

{

System.out.println("The smallest number is"+n2);

}

else

{

System.out.println("The smallest number is"+n3);

}

Test cases for this program using equivalence class testing technique:

Test Case No. Test Value Expected Value EC being tested
TC1 n1=6; n2=8; n3=10 6 EC1
TC2 n1=10; n2=12; n3=2 2 EC2
TC3 n1=12; n2=1; n3=5 1 EC3
TC4 n1=n2=n3=10 10 EC4
Please log in to add an answer.