Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Pythagorean Theorem relates the lengths of the three sides of any right triangle. The legs of a right triangle (the two sides of the

The Pythagorean Theorem relates the lengths of the three sides of any right triangle. The legs of a right triangle (the two sides of the triangle that meet at the right angle) are customarily labelled as having lengths a and b, and the hypotenuse (the long side of the triangle, opposite the right angle) is labelled as having length c. The lengths are related by the following equation: a ^2 + b^2 = c ^2. refer to http://www.purplemath.com/modules/pythagthm.htm for details.

This equation allows you to find the length of a side of a right triangle when theyve given you the lengths for the other two sides, and, going in the other direction, allows you to determine if a triangle is a right triangle when theyve given you the lengths for all three sides.

This equation can alternatively be written as c = sqrt of (a^2+b^2). You can find the square root of a number by calling the standard function Math.sqrt. For example, the statement double y = Math.sqrt(x) sets y to the square root of x.

Given the right triangles described below, write a program to compute the lengths of the remaining sides using a program.

a = 48 and c = 80

a = 84 and c = 91

Determine if the following triangles are right-angled triangles:

a = 45, b = 55, and c = 75

a = 28, b = 45, and c = 53

image text in transcribed

Triangle Attributes + private boolean rightTriangle +private double a + private double b + private double c Operations + public boolean isRightTriangleO + public double getA0) +public double getBO + public double getc) +public Triangle(double a, double b, double c)

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_2

Step: 3

blur-text-image_3

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

Intelligent Information And Database Systems 6th Asian Conference Aciids 2014 Bangkok Thailand April 7 9 2014 Proceedings Part I 9 2014 Proceedings Part 1 Lnai 8397

Authors: Ngoc-Thanh Nguyen ,Boonwat Attachoo ,Bogdan Trawinski ,Kulwadee Somboonviwat

2014th Edition

3319054759, 978-3319054759

More Books

Students also viewed these Databases questions

Question

5. Outline the predictable stages of most relationships

Answered: 1 week ago