Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Java, please. Write a program called VowelFrequencies that processes three text files, each a novel in a different language, by computing and printing the
In Java, please.
Write a program called VowelFrequencies that processes three text files, each a novel in a different language, by computing and printing the percentage of vowels in each. The languages are English, French, and German and you can find the files in the Data module in D2L. Your program should count the number of alphabetic characters, the number of vowels, and then compute the percentage of alphabetic characters that are vowels along with the name of the file being processed. Here are some hints for making this work: Process the text files character by character. This is probably easiest if you read in the entire text file as a single string. Use the method Character.isAlphabetic(char c) to determine whether a character is an alphabet character. Write a method isVowel (char c) that returns true if the parameter is a vowel. To determine that, create a string with all of the vowels and then use that with the String method indexOf(char c) to see whether the character is in the string. Use the Java 11 documentation pages to look up how the indexOf method words. Here is the string of vowels: "aeiouoooooAE IOUAAAAEEEEIIIOOOOOStep 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