Triangle Calculator Specification

Michael Bolton, 2017
Based on the Perl / Perl/TK version written by James Bach, in 2000
Based on an exercise in The Art of Software Testing, by Glenford Myers

Purpose

This program is intended for use in testing classes and job interviews to aid in education and evaluating software testing skill.

Specification

The program takes 3 positive numbers, each in its own field. When the check button is pressed, the program interprets the numbers as the lengths of the sides of a triangle, and displays one of the following in the output field:

The program also helpfully checks to see if the specified numbers could possibly be a triangle. The three numbers can represent a triangle if and only if any two of the numbers add up to a length that is greater than the third number.

The triangle you specify is drawn inside the rectangle. It will be scaled so that it fits inside that area.