Building Triangles
From Huben's Wiki
Line 17: | Line 17: | ||
* a perimeter() method that anybody can use which returns the perimeter of the Triangle. | * a perimeter() method that anybody can use which returns the perimeter of the Triangle. | ||
* an area() method that anybody can use, [[http://www.mathopenref.com/coordtrianglearea.html which uses this formula.]] Remember that the functions you'll need are in class Math. | * an area() method that anybody can use, [[http://www.mathopenref.com/coordtrianglearea.html which uses this formula.]] Remember that the functions you'll need are in class Math. | ||
− | * a toString() method that has no arguments and returns a | + | * a toString() method that has no arguments and returns a String describing the Triangle by its three points, its side lengths, its perimeter and its area. |
Class TestTriangle will have a main() that should: | Class TestTriangle will have a main() that should: |