Write a method named inputStats that takes a Scanner representing a file as a pa
ID: 3531023 • Letter: W
Question
Write a method namedinputStatsthat takes aScannerrepresenting a file as a parameter and that reports various statistics about the file's text. In particular, your method should report the number of lines in the file, the longest line, the number of tokens on each line, and the length of the longest token on each line. You may assume that the input file has at least one line of input and that each line has at least one token. For example, if aScannernamedinputon filecarroll.txtcontains the following text:
then the callinputStats(input);should produce the following output:
Explanation / Answer
In which programming language do you want your answer to be?
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.