Question: (JAVA) Write a program that reads a file and counts the number of times the vowels A, E, I, O, U occurs exactly in that
(JAVA) Write a program that reads a file and counts the number of times the vowels A, E, I, O, U occurs exactly in that order.
- It ignores consonants
- It ignores any type of space
- It ignores case
- The only thing it cannot ignore is if another vowel occurs out of order
These count
- AEIOU
- aeiou
- hahehihohu
- Take it out
These do not
- AEIuO
- Taco is good
- Take it over
Hints and Tips:
It may be a good idea to build one long string and use .charAt to examine each loop
There may be many nested loops
The file reads as:
AEIOU aeiou baeiboeu bbbaaaaaa beaeiou caeuoi ajejijoju aeioo aeiOu ma me mi mo mu take it OUT!
Example Dialog:
The file blah.txt has "AEIOU" in order 7 times
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
