Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago