Question: In this problem, you will create a program that can read N integer numbers, store them in an array and then use a method to

In this problem, you will create a program that can read N integer numbers, store them in an array and then use a method to calculate and return the average of all numbers. You must create the method and calculate the average of the numbers Inside the method. The method's signature is as follows: private static double calculateAverage (int[] numbers) Your program will implement the following algorithm: 1. Read the value of N. 2. Create an array of size N. 3. Read from the user and store N integers on the array. 4. Call the calculate Average method and store the result 5. Print the average limited to 3 decimal points using the printf method (%.3f) Please note: The first test case will ensure that you have the correct method signature. The second test case will test your method isolated from the rest of your program. These two methods are called unit tests and will be the norm from now on. Example 1/0 (Test cases 3,4,5) Input 49130 8 8 1 89 3 12 22 20 11 Output 3.250 20.750
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
