Question: Given a sentence with no punctuation such as this: An After - School Program Teaches Teens Java and Python when the students also learn

Given a sentence with no punctuation such as this: "An After-School Program Teaches Teens Java and Python when the students also learn how to design board games and video games" Write a method that prints out the word and counts the number of words that ends in a vowel letter "a" or "e" or "i" or "o" or "u" public static int countEndVowel (String str) Your method MUST follow these steps: 1. str is the parameter used to pass the sentence. Use toLowerCase and split to change the parameter str into an array of Strings 2. Use a for-each loop to test each word. Use endsWith to help you determine if the word ends in a vowel. 3. If it does, print out the word and also increment the count 4. return the count at the end of the program.

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!