Reference no: EM13978762
This exercise is to write a program to compute the hypotenuse of a right triangle, using the Pythagorean Theorem.
1. Review the Pythagorean Theorem, in case your geometry is rusty.
2. Write pseudocode in a text editor that shows the program sequence: 1) output explanation of the program purpose, 2) query the user for the sides of the triangle, 3) compute the length of the hypotenuse, 4) output the result.
3. Save the pseudocode as PythagorasXY.txt.
4. Write the program with Java class and filename PythagorasXY. Assume the user may input any decimal value. Use the Scanner class to read input, System.out.println for output. Use Math.pow and Math.sqrt in the program.
5. Compile and run.
6. Save a screenshot of the program run from the command line using the sides of 8 and 15 with a filename of PythagorasXY.png
How to Submit Your Work
Zip the .txt, .java, and .png file together into Pythagoras.zip.
Firm net income exceeded return on shareholds equity
: How Disney dealt with the Principal - Agent Problem: In 1984, the Walt Disney Company brought in Michael Eisner, a Paramount executive as CEO. The firm's board of directors agreed to pay Eisner a salary of $750,000, plus a $750,000 bonus for signing ..
|
Describe a pattern that you would like to change
: STEP ONE: DETERMINING WHY CHANGE IS DESIRED- Describe a "pattern" that you would like to change. Describe the relationship in which it exists. Discuss the: Problems it creates for you
|
What is the estimated loan rate for the five-year bank loan
: Cartco needs to borrow $4 million for an upgrade to its headquarters and manufacturing facility. Management has decided to borrow using a five-year term loan from its existing commercial bank. The prime rate is 3 percent, and Cartco’s current rating ..
|
Assume investment is low risk-no riskier than putting momey
: How much are you willing to invest today to receive $150 a year for seven years and an additional $1,200 at the end of the seventh year? Assume this investment is low risk, that is, no riskier than putting money in a bank earning 2%.
|
Write the program with java class and filename pythagorasxy
: Write pseudocode in a text editor that shows the program sequence: 1) output explanation of the program purpose, 2) query the user for the sides of the triangle, 3) compute the length of the hypotenuse, 4) output the result.
|
Describe how you might approach photography differently
: Consider the effect of composing photographs using the fundamental principles of photography you have studied in this course.
|
What is approximate total amount of money issuing these bond
: The Biltmore Equipment Co. just issued 250,000 zero coupon bonds. These bonds mature in 30 years, have a par value of $1,000, and have a yield to maturity of 7.25 percent. What is the approximate total amount of money the company raised from issuing ..
|
Planning to save for retirement
: You are planning to save for retirement over the next 35 years. To do this, you will invest $840 per month in a stock account and $440 per month in a bond account. The return of the stock account is expected to be 10.4 percent, and the bond account w..
|
Calculate the NPV of going directly to market
: Ang Electronics, Inc., has developed a new DVDR. If the DVDR is successful, the present value of the payoff (when the product is brought to market) is $34.7 million. If the DVDR fails, the present value of the payoff is $12.7 million. If the product ..
|