Question: 2 115) Scanner Write a static method named wordStats that accepts as its parameter a Scanner holding sequence of words and that reports the total

2 115) Scanner Write a static method named wordStats that accepts as its parameter a Scanner holding sequence of words and that reports the total number of words (as an integer) and the a word length (as an un-rounded double). For example, suppose the source that contains the following words: Scanner is scanningn To be or not to be, that is the question. he purposes of this problem, we will use whitespace to separate words. That his is the same definition that the means that some words include punctuation, as in "be,". (T Scanner uses for tokens.) For the inp output: ut above, your method should print exactly the following Total words 10 Average length 3.2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
