Question: create a new Java application called AverageWithMethods ( without the quotation marks ) according to the following guidelines.The program prompts the user for five to

create a new Java application called "AverageWithMethods" (without the quotation marks) according to the following guidelines.The program prompts the user for five to ten numbers, all on one line, and separated by spaces. Then the user calculates the average of those numbers, and displays the numbers and their average to the user.The program uses methods to:Print out the program description to the user. Get the numbers entered by the userCalculate the average of the numbers entered by the userPrint the results with the whole number, a decimal, and two decimal positionsThe second method should take no arguments and return a String of numbers separated by spaces. Scanner input = new Scanner(System.in); --> needs to be declared in the method The third method should take a String inputString as its only argument and return a double (the average). Hints:--> Read each double from the String using a while loop: Scanner strInput = new Scanner(inputString); >> strInput.has....(), strInput.next....()--> Verify that the user entered at least 5 and at most 10 numbers. If not, print an error message and exit the program. ****--> Remember to use variables needed to get total and calculate the average.The fourth method should take a String and a double as arguments but have no return value. For example, if the user input is...20406080100...the program should give as output... The average of the numbers 20406080100 is 60.00.

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!