Question: Problem 3: [10 marks] Compute the area of a triangle (filename: ComputeTriangleArea.java) Design an algorithm (put the algorithm in the same external documentation file created
![Problem 3: [10 marks] Compute the area of a triangle (filename:](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f53841b23f8_75366f5384152f6c.jpg)
Problem 3: [10 marks] Compute the area of a triangle (filename: ComputeTriangleArea.java) Design an algorithm (put the algorithm in the same external documentation file created from Problem 1) and then write a program that prompts the user to enter three points (x1, yl). (x2, y2), (x3.y3) of a triangle and displays its area. Format the area with two digits after the decimal point. The formulas for computing the sides and the area of a triangle are = side 1 V(x1 - x2)2 + (y1 - y2)2 side2 = (x1 x3)2 + (y1 - y3)24 side3 = V(x2 - x3)2 + (y2 - y3)2 = (sidel + side2 + side3)/2 area = s(s - sidel)(s - side2)(s - side 3) S Here is a sample run: Enter three points for a triangle: 1.5-3.4 4.6 5 9.5-3.44 The aros of the trianglo ir 22 50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
