Question: (Average an array) Write two overloaded methods that return the average of an array with the following headers: public static int average(int [] array) public

(Average an array) Write two overloaded methods that return the average of an array with the following headers:

public static int average(int [] array)

public static double average(double[] array)

Write a test program that prompts the user to enter to double values, invokes the method and displays the average value.

(Average an array) Write two overloaded methods that return the average of an array with the following headers:

public static int average(int [] array)

public static double average(double[] array)

Write a test program that prompts the user to enter to double values, invokes the method and displays the average value.

Replicate the following output:

(Average an array) Write two overloaded methods that return the average of

Sample Run for Exercise07 08 Enter input data for the program Sample data provided below. You may modify it.) 1.7 89.2 3.5 2.2 1.2 6.3 4.3 21.4 5 1 2.5 TINY NEBULA] Watercolor Painting Show the Sample Output Using the Preceeding Input command java Exercisee7 08 Enter 10 double values: 1.7 89.2 3.5 2.2 1.2 6.3 4.3 21.4 5.1 2.5 The average value is 13.74 command

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!