Write a program to compute the length of the remaining sides

Assignment Help Programming Languages
Reference no: EM131251215

When solving the problems in this section, you must follow the application programming interface (API) expected in each problem. You should implement all the attributes and operations mentioned in the API.

Note that there is no main method in the APIs. That is, you should not perform any data processing within the main method. You should rather use the main method to test other methods, prompt the user for some inputs, and display the results returned by your methods.

Question

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 https://www.purplemath.com/modules/pythagthm.htm for details.

This equation allows you to find the length of a side of a right triangle when they've 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 they've 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

Reference no: EM131251215

Questions Cloud

Some merchandise is custom-made to customer specifications : Daniel owns Veiled Wonders, a firm that makes window treatments. Some merchandise is custom-made to customer specifications, and some is mass- produced in standardized measurements. He has production workers who work primarily on standardized blinds ..
The amount of pay they will receive for biweekly pay period : West Virginia State University has a policy of hiring students to work in its bookstores and cafeterias. Assuming that 138 students work for the university at minimum wage rates, what is the amount of pay they will receive for a biweekly pay period, ..
New sales organization for the western region : What are the advantages and disadvantages of developing a New sales organization for the Western Region that would organize according to these customer types: - grocery chains and food co-ops.
Determine gross pay-what is the minimum wage : For each of the piece-rate workers below, determine gross pay. If the employees have a standard 37.5-hour workweek, what is their effective hourly rate (the gross pay/37.5 hours)? Based on FLSA minimum wages, what is the minimum wage they must receiv..
Write a program to compute the length of the remaining sides : Given the right triangles described below, write a program to compute the lengths of the remaining sides using a program. Determine if the following triangles are right-angled triangles: a = 45, b = 55, and c = 75.
Develop an inventory control plan for ec : Develop an inventory control plan for EC to use as the basis for its upcoming annual plan. Justify your reasons for choosing a particular type of inventory system(s).
New customers they sign up for new magazine subscriptions : Outbound sales representatives receive a $20 commission on all new customers they sign up for new magazine subscriptions. Each outbound sales representative works 40 hours. Because these employees are paid solely on commission, the employer must ensu..
Write a program to compute the total bonus amount earned : An employee has committed to save $2000 per month. Write a program to compute the total bonus amount earned by these two employees in the year.
Analyze the prioritizing process : Analyze the prioritizing process at D. D. Williamson. Suggest two (2) recommendations to improve the prioritizing process. Create a scenario where the implemented process at D. D. Williamson would not work.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program using while loop to output squares of integers

Write a program that uses while loop to perform the following steps:Output the sum of all the even numbers between firstnum and secondnum inclusive. Output all the numbers and their squares between firstnum and secondnum inclusive.

  Designing the site links

Company needs to be able to schedule the time of day when the connections are available for replication. Replication should not occur during peak business hours. When designing the site links, which of the following options should you use?

  Write a perl program that manage browser cookies

One of the main strengths of the Perl programming language is its support for text manipulation. In this assignment, you will use it for writing a Perl program that can manage a simplified version of the so-called "browser cookies".

  Create a program to compute car-s miles-per-gallon

Create a program which ask's the user for number of miles driven and gallons of gas used. It must compute the car's miles-per-gallon and show the result on the screen.

  Program to find if number input by user is palindrome or not

Write down the program which uses the method called palindrome ( ) to find out if number input by user is a palindrome or not. For instance 1221 is palindrome as it can be read same way forwards and backwards.

  Write program to accept data in array with three structures

Develop and make a program which will accept above data in array with three structures. Once data have been entered, display report listing each employee number and salary of employee.

  Display policy data after revisions have made

The day is not correct for the month (that is, between 1 and 31 for January, 1 and 29 for February, and so on), then set the month, day, and year to 0. Display the policy data after any revisions have been made.

  Write pseudocode

Write pseudocode that represents the abstract functions of the enqueue and dequeue operations. Define and explain any supplementary information needed by your pseudocode.

  Interactive program that plays the game hangman

Write an interactive program that plays the game Hangman. Use the random integer function to randomly select the word to guess out of the file provided. The player must guess the letters belonging to the word.

  Create a non-gui based java application

Yes, you are to create a main method that will create an instance of the class. The class should contain a constructor and a method that performs all of the functionality of the previous program.

  Compute the area of a circle

In MIPS assembly, write an assembly language program which asks a user for a decimal number, converts it to hex, prints the result.

  Choose one 1 of the working groups in the ietf or ieee and

write a three to four 3-4 page paper in which youquestion 1. select one 1 of the working groups in the ietf or

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd