Free University of Bolzano/Bozen
Faculty of Computer Science - Bachelor in Applied Computer Science
Bachelor in Production Engineering
Introduction to Programming - A.A. 2004/2005

Class Triangle

Design and realize a Java class Triangle to represent triangles. The following functionalities are of interest for triangles: Notice that, given the lengths a, b, and c of the three sides of a triangle, the area A can be computed according to A = sqrt(s*(s-a)*(s-b)*(s-c)}, where s = (a+b+c)/2 is the semiperimeter.