Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3.17zyLab: Calculate Area of Isosceles Trapezoid Calculate Area of Isosceles Trapezoid The goal of this lab is to calculate the area of an isosceles trapezoid

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribed

3.17zyLab: Calculate Area of Isosceles Trapezoid Calculate Area of Isosceles Trapezoid The goal of this lab is to calculate the area of an isosceles trapezoid using the provided methods. The height of the above trapezoid is 3ft, the shorter and longer sides are 4ft and 8ft respectively. The figure has an area of 18 square feet. (1) main method: Ask the user to enter the height of the trapezoid in feet along with the lengths of the parallel sides, and then store these values as doubles. (2) Complete the methods getAreaOfTriangle and getAreaOfRectangle. (3) main method: From the given inputs, calculate base and height of the triangles. (4) main method: Calculate the area of the isosceles trapezoid by using the two provided functions and display the results as shown below. Keep in mind that the smaller side of the trapezoid should be one of the rectangle's dimensions. Enter height (in feet) of the isoceles trapezoid: Enter length (in feet) of the shorter side of the isoceles trapezoid: Enter length (in feet) of the larger side of the isoceles trapezoid: Base of the Triangle: 2.0 feet Area of the Trapezoid: 40.0 square feet Example 2: Remember that the input for the shorter side's length is always lesser than the larger side's. Additionally, there won't be any negative valued inputs. Input: 3.5 4 6.3 Output: Enter height (in feet) of the isoceles trapezoid: Enter length (in feet) of the shorter side of the isoceles trapezoid: Enter length (in feet) of the larger side of the isoceles trapezoid: Base of the Triangle: 1.15 feet Area of the Trapezoid: 18.025 square feet mport java.util. Scanner; * Calculates area of an isoceles trapezoid taking the height and length's of the parallel sides * as inputs from the user. * ublic class TrapezoidAreaCalculator \{ 1 * Calculates area of a triangle given the base and height * Example: for a triangle with base and height measurements of 4 and 6 feet respectively, * the method should return 12 * @param base The base of the triangle * @param height The height of the triangle * @return Area of the described triangle / public static double getArea0fTriangle(double base, double height) \{ I/COMPLETE THE METHOD AS PER THE HEADER, CHANGE THE RETURN VALUE TO THE AREA CALCULATED return 1 \} / * Calculates the area of a rectangle given the length and the width * Example: for a rectangle of length and width measurements of 5 and 7 feet respectively * the method must return an area value of 35 * @param length The length of the rectangle * @param width The width of the rectangle * @return Area of the described triangle */

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

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions