A Java class representing a triangle.