Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please send me working Java program only 4. Vowels and Consonants Write a class with a constructor that accepts a string object as its argument.

Please send me working Java program only image text in transcribed
4. Vowels and Consonants Write a class with a constructor that accepts a string object as its argument. The cla should have a method that returns the number of vowels in the string, and anothe that returns the number of consonants in the that performs the following steps: ss r method string. Demonstrate the class in a program 1. The user is asked to enter a string. 2. The program displays the following menu: a. Count the number of vowels in the string b. Count the number of consonants in the string c. Count both the vowels and consonants in the string d. Enter another string e. Exit the program 3. The program performs the operation selected by the user and repeats until the user selects e, to exit the program

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

=+ d. What happens to Oceanias trade balance?

Answered: 1 week ago

Question

=+ e. What happens to Oceanias real exchange rate?

Answered: 1 week ago