subject

Write a class with a constructor that accepts a String object as its argument. The class should have a method that returns the number of vowels in the string, and another method that returns the number of consonants in the string. (Spaces count as neither vowels nor consonants and should be ignored.) Demonstrate the class in a program that performs the following steps:1. The user is asked to enter a string .
2. The program displays the following menu:
1. Count the number of vowels in the string
2. Count the number of consonants in the string
3. Count both the vowels and consonants in the string
4. Enter another string
5. Exit the program

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:00
Ineed a good science fair name i’m doing a homemade water filter and i have no idea what the title should be plz
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
As with any small island country, cuba has fewer natural resources than countries such as brazil. this affects their economy in that cuba a) exports only manufactured products. b) exports more products than it imports.. c) must import more products than it exports. d) has imposed trade barriers against the united states.
Answers: 3
question
Computers and Technology, 23.06.2019 03:00
State 7 common key's for every keyboard
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
You know the right answer?
Write a class with a constructor that accepts a String object as its argument. The class should have...
Questions
question
History, 09.09.2021 02:10
question
Mathematics, 09.09.2021 02:10
question
Mathematics, 09.09.2021 02:10
Questions on the website: 13722360