How do I make a java program that counts the averGe words per sentence


A computer sleuth basically


I chose a random category because there were no similar ones to my question


Hi @anshgames,

The general idea would be to have a function which calculate:

  • The number of words available - Total words count
  • The number of sentences - Total sentences count
  • Get the total of both then you can get the average by dividing Total words count/ Total sentences count

Questions you need to think of:

  • How to check for a word, how you determine a word in a sentence?
  • How to check for a sentence, how you determine a sentence is a sentence, what constitutes it?

It’s an interesting small project but you will have to come up with your own code, come back and ask more questions if you’re stuck, other experienced users will able to help that way.

Hope the idea helps to spark your innovation. Cheers :slight_smile:

Another note: JavaScript is different from Java, so you need to determine which programming language that you’re asking.


Thank you so much, this really helped


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.