Write a class in Java
1) Consist of two methods: a. main
b. printHigherThanAverage
public static void printHigherAverage(double [] numbers, double avg)
The method will print all the numbers in the array, numbers, which are higher than the average.
2) In the main methods, create an Array which can contain 5 elements of type double
3) In a loopa. Ask the user for 5 values using a Scanner. b. Store the values in the arrayc. Sum the values
4) At the end of the loop:
Calculate the average.
Call the method printHigherAverage and pass it the array and
the average.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here