(3) Write a Java program that prompts the user to enter a sentence (phrase), then it counts how many vowels and consonants in the sentence (phrase). The sentence (phrase) should be typed in by the user in response to a prompt message. Your program must consider the following specifications: Use Letter as the name of your class. Type your name and student number above the class declaration using a block/paragraph comment. Use documentation, comments and code style. Use significant and appropriate identifiers. Use appropriate data type for the variables. Here is a sample run of the program:

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 19SA
icon
Related questions
Question
Using loops Make the output looks like the following sample run in the question
(3) Write a Java program that prompts the user to enter a sentence (phrase), then it
counts how many vowels and consonants in the sentence (phrase). The sentence
(phrase) should be typed in by the user in response to a prompt message.
Your program must consider the following specifications:
Use Letter as the name of your class.
Type your name and student number above the class declaration using a
block/paragraph comment.
Use documentation, comments and code style.
Use significant and appropriate identifiers.
Use appropriate data type for the variables.
Here is a sample run of the program:
Enter a string:
Programming is fun
The number of vowels is 5
The number of consonants is 1
Transcribed Image Text:(3) Write a Java program that prompts the user to enter a sentence (phrase), then it counts how many vowels and consonants in the sentence (phrase). The sentence (phrase) should be typed in by the user in response to a prompt message. Your program must consider the following specifications: Use Letter as the name of your class. Type your name and student number above the class declaration using a block/paragraph comment. Use documentation, comments and code style. Use significant and appropriate identifiers. Use appropriate data type for the variables. Here is a sample run of the program: Enter a string: Programming is fun The number of vowels is 5 The number of consonants is 1
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning