Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part Three: Use Eclipse to write the code and when you are ready copy the code to a word document and submit it on Blackboard

image text in transcribed
Part Three: Use Eclipse to write the code and when you are ready copy the code to a word document and submit it on Blackboard or submit the java file. Write a program in a class NumberAboveAverage that counts the number of days that the temperature is above average. 1) a. Read ten temperature from the keyboard and place them in an array. b. Compute the average temperature. c. Count and display the number of days on which the temperature was above average 2) Write a program that calculates the hypotenuse of a right triangle using Pythagorean Theorem. The program should ask the user to enter 2 values. The first value is the length of the first triangle side, and the second value is the length of the second triangle side. Assume the values to be double. Your program should contain three methods: calculateHypotenuse, addSquares, and main. The first method (calculateHypotenuse) should use addSquares method. addSquares will first check the validity of the input (remember the sides of a triangle cannot be negative!), and if the input is valid then it will add the squares of the two sides and return the result. Otherwise, it will return -1. The method calculateHypotenuse will then do the rest of the calculation to get the length of the Hypotenuse. Otherwise it will return -1. h: Hypotenuse a: side 1 of right triangle b: side 2 of right 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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

List out some inventory management techniques.

Answered: 1 week ago

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago