Question: //Confused and need help. Can I see someone's code and JavaDoc, please? I am using Eclipse (Java). Thanks! Write a program, WordCalculator, that reads from

//Confused and need help. Can I see someone's code and JavaDoc, please? I am using Eclipse (Java). Thanks!

Write a program, WordCalculator, that reads from the user unknown number of words. Checks if a word consist only of digits and if this is the case converts the word to Integer and adds it to a sum of total which is displayed at the end. To check if a word consist only of digits write a method:

public static bool isInteger(String word)

If the word is not an integer then use it to calculate the average length of the words in the input.

Example input: Hello! World. 123 123grh 2 Im

Example output: Total: 125 Average word length: 5.25 Note: End of input is indicated by pressing (Ctrl + Z, or Ctrl + X, or Ctrl + D or similar combination depending on the OS).

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!

Q:

\f