Updated version of triangle_rectangle_circle.java