Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Write a Java program ( in file named vowels.java ) as follows. The main function of the program prompts the user to enter a

Java
Write a Java program (in file named vowels.java) as follows. The main
function of the program prompts the user to enter a string. The main function then passes the string
as argument to another recursive function named countVowels(..)(part of file vowels.java). The
recursive function takes the string argument as a parameter and recursively counts and returns the
number of vowels (a,e,i,o,u) in the passed 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.
The class defines the following member functions:
Integrate the following simple menu in the program with these options:
-----MAIN MENU-----
Read input string
Compute number of vowels
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.
Test data is entered using the menu options. Do Not use output labels as input prompts. Test your code with
the following sample inputs and format the output as shown below. Notice how output values are lined-up
after the labels.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 Universal Database V7.1 Application Development Certification Guide

Authors: Steve Sanyal, David Martineau, Kevin Gashyna, Michael Kyprianou

1st Edition

0130913677, 978-0130913678

More Books

Students also viewed these Databases questions