Program that counts the number of occurrences of lowercase

Assignment Help Computer Engineering
Reference no: EM13713031

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.

Reference no: EM13713031

Questions Cloud

What is the output of the first round of the des algorithm : What is the output of the first round of the DES algorithm when the plaintext and the key are both all zeros?
Prepare a program in mips assembly language : Prepare a program in MIPS assembly language that reads in a sequence of signed 32-bit integers (words) and return the maximum, the minimum, and the median value of the input sequence.
Find the heat absorbed by the gas : A cylinder contains 23 moles of an ideal gas at a temperature of 300 K. The gas is compressed at constant pressure until the final volume equals 0.43 times the initial volume.
Describe why a brute-force attack does not work : Explain exactly why an exhaustive key search will not succeed even though sufficient computational resources are available. This is a paradox since we know that the OTP is unconditionally secure.
Program that counts the number of occurrences of lowercase : 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.
Find the change in the internal energy of the gas : monatomic ideal gas undergoes an isothermal expansion at 300 K, as the volume increased from 0.03 m3 to 0.21 m3 the final pressure of the gas is 60 kPa.
Find the radius of the circle : The program should then output the circle's radius, circumference, diameter, and area. Your program must have at least the given methods - Find the radius of the circle, and returns the circle's radius.
What kelvin temperature does the rms speed : At what Kelvin temperature does the rms speed of the oxygen (O2) molecules in the air near the surface of the earth become equal to the escape speed from the earth.
Write a switch statement that assigns a string variable : Write a switch statement that assigns a String variable monthName with the months January, February, March, April, May, and June, ifmonthNum is 1, 2, 3, 4, 5, 6, accordingly.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Identifynbspa minimum of three technological tools that you

writenbspa paper of approximately 750 words that discusses the need and necessity of research and technological

  Take a disk holding files with an average file length

examine a disk holding files with an average file length of 5 KB. Each file is allocated contiguously on adjacent sectors. To better utilize the disk space, it must be periodically compacted, which involves reading each file sequentially and writi..

  Questionwrite down a six to eight page paper in which you-1

questionwrite down a six to eight page paper in which you-1. offer an executive overview that addresses following-a.

  One of the issues with the component object model com was

research available test case software. what are some features offered by the majority of the products?discuss the

  Assignment cores on computer systemssingle-processor

assignment cores on computer systemssingle-processor computers were able to handle and process smaller sets of data.

  Write a paper explaining the business uses of cloud

write a paper explaining the business uses of cloud computing and web 2.0. your paper should be 3-5 pages in length

  At what rate must the magnetic field change

At what rate must the magnetic field change with the time if an induced current of 10 A is to appear in the loop?The resistivity of copper is 1.7X10^-8 ohm.

  Computer forensics investigation

As a new computer forensics investigator and as a matter of the forensics policy and procedure, you will require to understand the procedures for processing incident scene for the digital and the logical evidence.

  Which is the first line of a class definition

Look at the following code, which is the first line of a class definition: public class Tiger extends Felis In what order will the class constructors execute?

  What does a voip phone do with a pstc phone

What does a VoIP phone do that the PSTC phone can't do in the way of service, not cost of service.

  Estimaitng the cost of ordering and management

If company utilizing the best inventory policy, what would be the total cost of ordering and management?

  Some of the important features of these programs

Research and explain web page development application software from various software companies.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd