1. Engineering
  2. Computer Science
  3. in java write a program that prompts the user to...

Question: in java write a program that prompts the user to...

Question details

In Java, write a program that prompts the user to input a sequence of characters and outputs the number of vowels. You will need to write a method to return a value called isAVowel which will return true if a given character is a vowel and returns false if the character is not a vowel. A second method, called isAConstant, should return true if a given character is a constant and return false if the character is not a constant. Set the program to discard case.

Sample:

Please enter a string of characters: Little Miss Muffet sat on her tuffet.

The string “Little Miss Muffet sat on her tuffet” contains 20 constants and 10 vowels.

Would you like to enter a new string (y/n)?

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution