Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program that reads a file called numbers.txt which contains an unknown quantity of integers. Your program should do the following with the data:

Create a program that reads a file called numbers.txt which contains an unknown quantity of integers. Your program should do the following with the data:

Calculate the sum of all numbers in the file

Calculate the average of all the numbers in the file

Determine the smallest number in the file

Determine the largest number in the file

Your program must print the results in a new file called results.txt. The contents of this file should be four (4) sentences displaying the results.

Example output:

The sum is 83747 The average is 198 The smallest is 4 The largest is 98

*** Should be in JAVA*****

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

Developing and delivering learning that is integrated with the job.

Answered: 1 week ago