Question: java please 8. (30) Write a complete Java prooram explaining what action(s) each performs. You must comment the main program and all methods, Design a
8. (30) Write a complete Java prooram explaining what action(s) each performs. You must comment the main program and all methods, Design a Java class with a main method that reads, for a number of books, the length of the longest and shortest sentence of each book. The number of books is not known but will not exceed Sample data to be read in: Explanation: there are three books, the first with a longest sentence of 20 and a shortest of 10; second book with longest sentence of 18 and shortest of 5 ; and a third book with longest sentence of 14 and shortest of 2 . main will invoke methods, that you write, to perform the following tasks: (a) main will pass a filename (for input) and array to a method readData that will read from the file the book data (longest/shortest length). The method computes the average length of the two sentences and stores it in the array that was passed to the method. The method will return the total number of books read in. For example, given the above data, after readData is finished executing, the array will contain
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
