Question
(Intro to Java) Write a Java program that takes a sentence as input and counts the number of words in the sentence that contain the
(Intro to Java) Write a Java program that takes a sentence as input and counts the number of words in the sentence that contain the vowels "A", "E", "I", "O", "U". Only count words that contain the characters "A", "E", "I", "O", & "U" and ignore case when counting vowels. Do not count the vowel "Y". If a word does not contain a vowel print the word and state it does not contain any vowel characters. Make it so that it has two other methods other than the main method. One method for counting the vowels and another to check if the word has a vowel. Please make most of the work in the two methods so that you can print each method in main. Explain in detail if you can.
Example if input is:
Do or Do Not, There is No Try!
the output is: Please enter a one line sentence: The word Try does not contain vowels. The number of words that contain vowels is 7
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