Question: IN JAVA PLEASE Double method returns the sum of the areas of 3 individual triangles. The base/height of each triangle are equal and are given.

IN JAVA PLEASE

Double method returns the sum of the areas of 3 individual triangles. The base/height of each triangle are equal and are given. (negitives can represent location as well as dimention) * The formula for triangle area is (b*h) / 2 and in our case, b = h = num.

threeTriangles(1.0,2.0,3.0) returns 7.0 threeTriangles(2.5,1.0,3.2) returns 8.745 threeTriangles(-1.0,-9.0,-7.0) returns 65.5 threeTriangles(0,0,8.0) returns 32.0 threeTriangles(1.0,1.0,1.0) returns 1.5

@param num1 double @param num2 double @param num3 double @return the sum of the area of all three triangles.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!