If and only if every character of the string is a vowel


Code a method called isAllVowels that returns whether a string consists entirely of vowels (a,e,i,o,u case-sensitively). If and only if every character of the string is a vowel, your method should return true. It should return true if an empty string is passed.

Verify that this method works. You are going to use this as a helper method for the next part.

Code another method called askFor Words that takes a Scanner as a parameter and will ask for will continually ask for a word until the user enters a word that is made of all vowels. Use the isAllVowels method in this method.

A possible output is shown below:

Enter a word: happy

Enter a word: computer

Enter a word: IOu

Finally all vowels, we are done.

Finish the steps by having your main method call your method.

Solution Preview :

Prepared by a verified Expert
Business Management: If and only if every character of the string is a vowel
Reference No:- TGS02787282

Now Priced at $10 (50% Discount)

Recommended (90%)

Rated (4.3/5)