The Triangle Javascript Edition
-----------------------------------------------------------------------
Originally this app was Written in Perl with the Perl/TK GUI library
By James Bach, in 2000.
Testing workshops today have a variety of devices including Windows,
Linux, MacOS and even mobile operating systems. This called for a new
version of the original app. Hence Javascript Edition was born. This
version is free to use the way you like!
-All the best, Antti Niittyviita (@niittyviita)
The original Triangle app is 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:
"Equilateral" (all sides of the triangle are equal)
"Isosceles" (two of the sides are equal)
"Scalene" (no side is equal to any of the others)
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 at the bottom of the
window. It will be scaled so that it fits inside that area.