Question: In java please Determine the number of syllables in a sentence with an arbitrary number of words. Here are some rules you are required to

In java please
Determine the number of syllables in a sentence with an arbitrary number of words.
Here are some rules you are required to use for determining the number of syllables in a word. There are other more complicated cases not described in the 4steps below. Ignore those cases for this assignment.
Step1)Do .toUpperCase()or .toLowerCase()to the input at the beginning so you have less comparisons
Step 2)Count the number of vowels including y (a,e,i,o ,u,y)
Step 3)Subtract 1for every instance of two vowels being next to each other.
Step 4)Subtract 1if there's a vowel at the end of the word (EXCEPT Y).
For example the word feline is 2syllables.
We determine that by taking the number of vowels (3),we check for any vowels next to each other (none),then we see if there are any vowels at the end of the word (1).The syllable count 3-1or 2.
Example
Input
I am tired
Output
4
Thank you

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 Programming Questions!