Question: JAVA - Please read the instructions in the image. All I know is each new line has a header value telling you how many numbers

JAVA - Please read the instructions in the image.
All I know is each new line has a header value telling you how many numbers are on each line on the file you are reading from.
I was having difficulty know how to read in each integer on each line to find the sum then average of that line. Then moving on to the next line.
Is there a way to grab one line at a time and read each individual integer on one line, then total and average that line, the go to the next line and do the same?
Its a basic Iava class so nothing fancy can be written.
Thanks!
 JAVA - Please read the instructions in the image. All I

ab 1.2 (Lab 9-5 in the 1115 labs)--Calculating Averages (Averages) The file nambers text conisits of sequences of numbers, each sequence preceded by a header valee nd then followed by that many integers Read in the sequences and print their averages When all sequences have been read m, print oute number of sequences processed ample Test Ra For example if the file nusbers,text. contains 12 1440 the program should produce the following outpu The averege of the 5 ietegers 12 24 6 60 17.2 The avexage of the 1 lategers 17 18 37. the average of the 2 inceger 90 80 n 95. .Ths data in this example as of a somewhat move coeoples structuce-both oof and heades value processing is requited (the formier so determine when theve are no more sequences, and the latter to process each sequence)

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!