GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Testing  >  Test Cases

 Print  |  
Question:  for a triangle(sum of two sides is greater than or equal to the third side),what is the minimal number of test cases required.




November 11, 2005 13:41:01 #4
 Seshagiri   Member Since: Visitor    Total Comments: N/A 

RE: for a triangle(sum of two sides is greater than or...
 

the minimum number of test cases = 1.6 * number of inputs sounds ridiculous to me.

For any given three points (input size = 3 ? ) to test if they form a triangle or not, the following two tests are SUFFICIENT.

1. Measure distance between the points, taking two points at one time. So you will have 3 values of length, none of them should be zero.

2. All the three points should not fall on a same straight line. To test this, measure the angle subtended by two points at the third point. You will get three values of angles. None of them should be 180 degrees.

     

 

Back To Question