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

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.

Step by Step Solution

3.47 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

import javautil public class Main public static void mainString args Scanner scanner n... View full answer

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!