Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Description Arrays review In this exercise, you are computing the average of an array of integers. However, averages are statistically sensitive to outliers ( very

Description
Arrays review
In this exercise, you are computing the average of an array of integers. However, averages are statistically sensitive to outliers (very large or very small values relative to the others in the array). Therefore, this problem asks you to throw out both the largest and the smallest values that exist in the array when computing the average. If there are multiple copies of the largest or smallest values, you should only throw out one of those. You are guaranteed that there will be at least three elements in the parameter array. Your function should return the integer average using integer division. We'll call this function insensitiveAverage().
For example:
insensitiveAverage ([55,7,-8]) should return 7
insensitiveAverage ([7,33,1,19]) should return 13
Starter code and tests have been provided for you.
1V****
You can put anything you want here. It won't be graded
But it can help you to debug your code -- make any
objects or method calls and print out the results
and they will be in the same place as your test results. */
public class RunMe { public static void main(String [] args){ system.out.println("This is debugging output"); ?
}
/home/RunMe.java Tabs (Auto)
Console
Run
image text in transcribed

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

Professional IPhone And IPad Database Application Programming

Authors: Patrick Alessi

1st Edition

0470636173, 978-0470636176

Students also viewed these Databases questions

Question

8. Satyam Computer Services Limited

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago

Question

7. General Mills

Answered: 1 week ago