Write a program that counts the number of occurrences of


Question- Write a program that counts the number of occurrences of lowercase and uppercase vowels in entered lines of text. Use a two-dimensional array to store the vowel counts. The array's first column holds the counts for the lowercase vowels, and the second column holds the counts for the uppercase vowels.

The user indicates the end of the input by pressing enter by itself. At that point, your program should print, for each vowel, the total number of lowercase occurrences, the total number of uppercase occurrences, and the total number of combined occurrences.

Here are some implementation requirements:

- Use two separate files - one for a main driver method and one for a VowelCounter class that keeps track of vowel counts.

- main - Repeatedly prompt the user to enter a line of text or press enter by itself to quit. Note that the stdIn.nextLine() method returns the empty string ("") if the user presses enter by itself. For each entered line of text, call the processLine method. When the user select to quit, call printSummary.

- Within the VowelCounter class, include these methods:

- processLine? This method receives a line of text as a parameter and uses it to update the vowel counts appropriately.

- printSummary ? This method prints a summary of the counts for all vowels entered.

Sample session:

Enter a line of characters (press enter by itself to quit):

Oscar the ostrich graduated

Enter a line of characters (press enter by itself to quit):

from Exeter in England.

Enter a line of characters (press enter by itself to quit):

 A: 4 lowercase, 0 uppercase, 4 total

E: 4 lowercase, 2 uppercase, 6 total

I: 2 lowercase, 0 uppercase, 2 total

O: 2 lowercase, 1 uppercase, 3 total

U: 1 lowercase, 0 uppercase, 1 total

Please make sure it compiles and write the full program to receive full credit. Thank you so much for your help.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that counts the number of occurrences of
Reference No:- TGS0966288

Expected delivery within 24 Hours