Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8:45 AM Wed Mar 13 94%- 3.scanner_string AverageLine_lab java aplus.doc A+ Computer Science AVERAGE LINE Lab Goal This lab was designed to teach you more

image text in transcribed
image text in transcribed
image text in transcribed
8:45 AM Wed Mar 13 94%- 3.scanner_string AverageLine_lab java aplus.doc A+ Computer Science AVERAGE LINE Lab Goal This lab was designed to teach you more about using Scanner to chop up Strings. 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. iles Needed Sample Data: 9 10 5 20 11 22 33 44 55 66 77 48 52 29 100 50 29 Average.java verageRunner ava 100 90 95 98 100 97 Sample Output 9 10 5 20 average-11.000 11 22 33 44 55 66 77 average44.000 48 52 29 100 50 29 average51.333 average0.000 8:45 AM Wed Mar 13 1 94%- Average.java //(c) A+ Computer Science //www.apuscompsci.com /Name - import java.util.Scanner; import static java.lang.System. public class Average private String line; public Average0 public Average(String s) public void setLine(String s) public int getCount0 int count-0 return count; public int getSum() int sum-0; return sum; public double getAverage0 double average 0.0; return average; public String getLine) return public String toString( return 8:45 AM Wed Mar 13 94% AverageRunner.java //(c) A+ Computer Science //www.apuscompsci.com /Name import java.util.Scanner; import static java.lang.System. public class AverageRunner public static void main( String args0)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

50 Tips And Tricks For MongoDB Developers Get The Most Out Of Your Database

Authors: Kristina Chodorow

1st Edition

1449304613, 978-1449304614

More Books

Students also viewed these Databases questions

Question

=+1. What are the organization's reputation goals on this issue?

Answered: 1 week ago

Question

Define policy making?

Answered: 1 week ago

Question

Define co-ordination?

Answered: 1 week ago

Question

What are the role of supervisors ?

Answered: 1 week ago

Question

6. Does your speech have a clear and logical structure?

Answered: 1 week ago