Example Test Plan
Student | Joe Student |
Program | Triangle (Dale p167) |
No. | Description | Input Data | Expected Output |
1 | Verify prompt, echo input, and output messages. | 3.0 4.0 | Enter the lengths of the two sides. The length of side A is 3.0000 The length of side B is 4.0000 The length of the hypotenuse is 5.0000 |
2 | Verify calculations with simple numbers | 3.0 4.0 | sqrt(32 + 42) =
sqrt(9 + 16) = sqrt (25) = 5 |
3 | Valid Data: Positive float |
4.0 5.0 | 6.4031 |
4 | Valid (but nonsense) Data Negative float |
-4.0 -5.0 | 6.4031 |
5 | Boundary Condition: zero |
0.0 0.0 | 0 |
6 | Valid Data: two digit float |
10.0 12.0 | 15.6205 |
7 | Valid Data: first number larger |
12.0 10.0 | 15.6025 |