Question: Write a complete Java program called AverageWithMethods (without the quotation marks) that Prompts the user for five to ten positive integers, all on one line,
Write a complete Java program called "AverageWithMethods" (without the quotation marks) that
Prompts the user for five to ten positive integers, all on one line, separated by spaces
Calculates the average of the numbers entered
Prints the numbers entered and their average, with the average printed to two decimal places
Uses one method that takes no arguments and returns a String of numbers separated by spaces
Uses another method that takes a String as its only argument and return a double (the average)
Uses a third method that takes a String and a double as arguments but has no return value.
EXAMPLE: If the user enters the numbers 20 40 60 80 100, your program should print, "The average of the numbers 20 40 60 80 100 is 60.00."
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
