Write a program that will prompt the user for a list of 5 prices. Once the user
ID: 3641199 • Letter: W
Question
Write a program that will prompt the user for a list of 5 prices. Once the user has entered all values, your program should compute and display the following:The sum of all the prices
The average of the prices
All prices that are higher than the calculated average
To better solve this problem, break your code out into the following methods:
sumArray – this method should receive an array and return the sum of all elements in the array. NOTE: this method produces no output.
aveArray – this method should receive an array and return the average of all elements in the array. NOTE: this method produces no output.
highPrices – this method should receive an array and an average. It should then print out all elements in the array whose values are greater than the average.
When you are finished writing these methods, create a main method that will prompt the user for the 5 prices and then call the appropriate methods.