Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Lab Description: Take a group of numbers all on the same line and average the numbers. First, total up all of the numbers. Then, take

image text in transcribedimage text in transcribedimage text in transcribed

Lab Description: Take a group of numbers all on the same line and average the numbers. First, total up all of the numbers. Then, take the total and divide that by the number of numbers. Format the average to three decimal places Sample Data: 9 10 5 20 11 22 33 44 55 66 77 48 52 29 100 50 29 Files Needed Average.Java AverageRunner.java 100 90 95 98 100 97 Sample Output: 910 5 20 average 11.000 11 22 33 44 55 66 77 average44.000 48 52 29 100 50 29 average 51.333 average 0.000 100 90 95 9B 100 97 average 96.667 import java.util.scanner; import static java.lang.System.*; public class Average private String line; public Average() public Average (String s) public void setLine (String s) public int getcount () int count-0; return count; public int getsum) int sum-0; return sum; public double getAverage double average-0.0; return average; public string getLine) return ""; public String tostring() return ""; import java.util.Scanner; import static java.lang.System.* public class AverageRunner public static void main( String args[])

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions