Implement a program that will ask the user to enter a letter one at a time and
Question:
Implement a program that will ask the user to enter a letter one at a time and add each letter to a String. You should stop when a full stop is entered, and then you will print out the number of vowels in the String.
REQUIREMENTS
. Please Use Only Java Language
• Your code must use do-while loop.
• Include the full-stop in the String.
• Use a switch-case statement to determine if a letter is a vowel or not.
• The user input is always correct (input verification is not required).
• You will need to think about what character you need to check for to show that a word has ended.
• Your code must produce the exact same output as shown below (the text in bold indicates the user input).
Example of the program output:
Example:
Enter a letter: h
Enter a letter: e
Enter a letter: l
Enter a letter: l
Enter a letter: o
Enter a letter: .
There are 2 vowels in the word hello.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill