Question: Program #1 (50 points): Write a Java program (in file named Vowels.java) as follows. The main method of the program prompts the user to enter

Program #1 (50 points): Write a Java program (in file named Vowels.java) as follows. The main method of the program prompts the user to enter a string. The main method then passes the string as argument to another recursive method named countVowels(...). The recursive method takes the string argument as a parameter and recursively counts and returns the number of vowels (a, e, i, o, u) in the string. Format the output as shown below and use the sample test data below to test your code. Allow the user to enter the input string using proper input prompt, such as Enter input string:

Integrate the following simple menu in the program with these options:

 ---------MAIN MENU--------- 
 1. Read input string 2. Compute number of vowels 3. Exit program 
 Enter option number: 

Always re-display the menu after an option (other than option 3) is fully exercised with blank lines before and after the menu.

Do Not hard-code test data in the code. Test data is entered using the menu options. Do Not use output labels as input prompts. Test data below does not show input prompts, only outputs. Test your code with the following sample inputs and format the output as shown below. Notice how output values are lined-up after the output labels.

You entered string: Number of vowels: 
You entered string: Number of vowels: 
You entered string: Number of vowels: 
This is a test input 6 

Hello world 3

My list of Objects 4 

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 Databases Questions!