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.

Showing Answers 1 - 54 of 54 Answers

sanjeev Chawla

  • Aug 22nd, 2005
 

The answer is 3 
 
1. Measure all sides of the triangle. 
 
2. Add the minnimum and second highest length of the triangle and store the result as Res. 
 
3. Compare the Res with the largest side of the triangle.

  Was this answer useful?  Yes

Rekha Basu

  • Sep 21st, 2005
 

Here are all the positive Test cases:test case#1objective:Verify that Given object is a Triangle,should have only 3 sides.that means not<3 & not>3test case#2objective:Verify that None of the 3 sides length is lessthan or equal to Zero.Test case#3Objective:side1 >= side2+side3test case#4Objective:side2>=side1+side3Test case#5Objective:side3>=side1+side2

  Was this answer useful?  Yes

rashmi ranjan nayak

  • Oct 18th, 2005
 

generally , we will calculate the the number of test cases that depends on the perticular module and its complexity.minimum number of test cases=(number of inputs)multiply(1.6) (approx. calculation)

  Was this answer useful?  Yes

Seshagiri

  • Nov 6th, 2005
 

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.

  Was this answer useful?  Yes

Consider the triangle has three sides like a,b,c:-Obj #1: Side "a" length should not be "Zero"Obj #2: Side "b" length should not be "Zero"Obj #3: Side "c" length should not be "Zero"Obj #4: Side "a" + Side "b" should be equal to Side "c"Obj #4: Side "b" + Side "c" should be equal to Side "a"Obj #4: Side "a" + Side "c" should be equal to Side "b"

  Was this answer useful?  Yes

sunil

  • Apr 7th, 2006
 

yr question is wrong... the sum of two sides cannt be equal to trird side... its always  greater than third side

  Was this answer useful?  Yes

Amit

  • Apr 26th, 2006
 

Your question is wrong. addition of two side is not equal to third side. addition of the square of two sides is equal to square of hypotenuse i.e. right angle triangle. Two test case is sufficient for this.

  Was this answer useful?  Yes

mark pardue

  • Apr 30th, 2006
 

I know the distance of two sides of a triangle. How do I determine the length of the third side?

  Was this answer useful?  Yes

Wanda Shattuck

  • Jul 11th, 2006
 

sanjeev Chawla Wrote: The answer is 3 
 
1. Measure all sides of the triangle. 
 
2. Add the minnimum and second highest length of the triangle and store the result as Res. 
 
3. Compare the Res with the largest side of the triangle.

  Was this answer useful?  Yes

muthukumar

  • Mar 29th, 2007
 

it depends on the triangle .

for any triangle : La +Lb+Lc = 180 [deg]
a<>0 ,b<>0 c<>o
a,b,c - should not be in same line

a=b=c [if equilateral triangle ] and a+b=b+c=c+a
a+b>=c [always]
[a2 +b2]=c2 [ right angle triangle

  Was this answer useful?  Yes

Dheeraj

  • May 3rd, 2007
 

Triangle itself means that it should be 3 sided figure then what is the point in checking wheather it has less than or more then 3 sides.


Correct me if i am wrong

  Was this answer useful?  Yes

Dean

  • Jun 4th, 2007
 

You know a triangle has 3 sides because it has been documented as such. So you get your test object and you better make damn sure it is a triangle, right?

A phone number should always be numbers so why test for letters?

  Was this answer useful?  Yes

rossma

  • Jun 12th, 2007
 

  ID          Description                         Input Data                             Expected Results
                                                      a            b            c
   1           Equilateral Triangle    5,5,5                                                  PASS
   2           Isosceles Triangle      4,4,5       5,4,4       4,5,5                    PASS
   3           Arbitrary Triangle                      3,4,5                                   PASS   
   4          non-Triangle(1)           9,4,4       4,9,4     4,4,9                     FAILED
   5          non-Triangle(2)           8,4,4       4,8,4     4,4,8                     FAILED
   6               zero data                0,4,5       4,0,5     4,5,0                     FAILED
   7                                             0,0,0                                                  FAILED
   8               minis data             -3,4,5       3,-4,5    3,4-5                Report Error
   9                                           -3,-4,-5                                           Report Error
  10              Data Missing                3,4                                          Report Error
  11              not a number             A,4,5                                         Report Error

Hope this is helpful:-)

  Was this answer useful?  Yes

Justin

  • Jul 3rd, 2007
 

Zero. All test cases must be written in consideration to the context, and with the context being absent, it is possible that it requires no testing. Furthermore, if this is to be a manual test case, it could be easier to just hire some ppl who know what a triangle is, and just use common sense to make the judgement. Good testing does require technical expertise as everyone's answer is including, but don't let it lose out to common sense when it yeilds a more elegant solution.

  Was this answer useful?  Yes

Chandru

  • Jul 5th, 2007
 

 The Answer is 2

Prerequisite : Triangle with sides of different measurement.


1. Add the least and second highest length of the triangle and store the result as X. 
 
2. Ensure X is not less than the largest side of the triangle

  Was this answer useful?  Yes

deepZ

  • Jul 12th, 2007
 

3 Test Cases are required.

1.  Test when sum of two sides is greater than the third side, it can be a triangle
2.  Test when sum of two sides is equal to the third side, it can be a triangle
3.  Test when sum of two side is less than the thrid side, it cannot be a trianlge(Boundary condition)


  Was this answer useful?  Yes

naveen

  • Aug 13th, 2007
 

I am assuming a,b,c are the sides of a triangle
1: verify a,b,c values are available or not
2: verify a+b>=c
3: verify b+c>=a
4: verify c+a>=b

  Was this answer useful?  Yes

We can take the Three sides of the Triangel as A, B, & C.

The test cases are.....
Id.                           Test Discription and Condition                                         Result.
1.  A <=> B (That the A can be EQUAL, LESS THAN or GREATER THAN to B).       Pass.
2.  C >= A+B(That the C should be GREATER THAN or EQUAL to A+B)                 Fail.
3.  C not <A+B(that the C should not be LESS THAN A+B)                                   Fail.

NOTE:
In a triangel, it is absoloutly not possible that a single side can be EQUAL or GREATER THAN the other or the rest two sides. Hence the result will defenitly be negative.

  Was this answer useful?  Yes

Here are two possible cases.
Supose side of the triangle are a,b and c.
1. a+b=c

than
a=b=c=0 (never)
a<c and b<c and c> a and b (always).


2. a+b>c
than

  Was this answer useful?  Yes

Test Cases


1. check whether the triangle has got only 3 sides or 3 values
2.Check whether the sum of any 2 sides is equal or greater than that of other side

  Was this answer useful?  Yes

ssaradha85

  • Jan 24th, 2010
 

 1 ) Check whether the figure is a triangle or not. 

 2 ) Measure all the three sides of the triangle.
 3 ) Add the minimal side & the second larges side & check whether it is = or > than the third side of the triangle.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions