Computer Science 587 - Fall 2009

Individual Assignment #1

Due: Wednesday, September 2, 2009

 

 

Consider the following problem statement:  Given three values representing the lengths of the sides of a triangle, determine whether the triangle is equilateral (all sides are equal), isosceles (two and only two of the sides are equal) or scalene (no two sides are equal).  The type of triangle determined should be output in a message.  If the sides do not form a triangle, an error message saying that the sides do not form a triangle should be output.

 

Develop a comprehensive list of test cases for a software program solving this problem.  That is, try to come up with set of test cases that will catch all errors that might be made by the programmers who write the code to solve this problem.   However, try to make sure you don’t specify any redundant or unnecessary test cases (e.g., ones that test for situations already covered by other test cases.  Provide the test cases in a table like that given below.  One example test case is shown.

 

 

Test Case #

Condition Being Tested

Input Data Values

Expected Results

 

 

a

b

c

 

1

Three valid equal sides

7

7

7

Prints “Equilateral Triangle”

2

 

 

 

 

 

. . .