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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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