construction of method calculate the area of a triangle in s