Answered step by step
Verified Expert Solution
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 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
Please send me working Java program only
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started