Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91252438

Have any Question?


Related Questions in Computer Engineering

Cwrite function that takes an array of doubles and the

C++ Write function that takes an array of doubles and the array length as parameters (compute the array length using size of, don't just put in the number 5). In the function, find and return the largest value. Write sec ...

A calling agency has data showing that the average response

A calling agency has data showing that the average response time is 5.6 minutes with a standard deviation of 1.8. The manager wants to know how much time is required for 75% of all calls to be handled (in other words, th ...

The toronto blue jays raises ticket prices from 100 to 120

The Toronto Blue Jays raises ticket prices from $100 to $120 per seat and experience a decline in ticket sales from 12000 to 10000 per game. i) What is the elasticity of demand for tickets? ii) Assuming the marginal cost ...

Question you must use the following outline for your paper

Question: You MUST use the following outline for your paper. All direct and indirect quotes should be properly cited using APA formatting. All sections should be labeled. This week's paper is a final draft. All spelling, ...

Scenario 1 19500 ascii characters are transmitted over a 3

Scenario 1: 19,500 ASCII characters are transmitted over a 3 Mbps circuit. The protocol uses 8-bits to encode each ASCII character, and adds an additional parity bit to help detect errors. Calculate the transmission effi ...

Take screenshots of functions running in clisplet x1 x2 xn

Take screenshots of functions running in cLISP, Let x1, x2, ...xN be a set of input features. A linear function that represent those features, will have a following form: Fw(x1, x2, .. xn)= w0 + w1 * x1 + w2 * x2 +... + ...

Software engineeringsuppose you are writing software for a

Software Engineering: Suppose you are writing software for a radio station that manages its playlists. The program will generate candidate playlists from a record library automatically and station personnel can then chec ...

What is the lithium by mass in a sample of pure lithium

What is the % lithium by mass in a sample of pure lithium carbonate that has a sample size of 10.0g?

When i have a class that extends application public class

When I have a class that extends Application (public class Game extends Application) I can easily call it from my driver class by typing launch(Game.class). Now I have two other classes where one extends JFrame and the o ...

Review the creating a process driven organization at

Review the Creating a Process Driven Organization at AgCredit case study online, and answer the following questions. Discussion Question: Propose an organizational structure for the IT department that you feel would supp ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As