Method that returns the number of consonants

Assignment Help Basic Computer Science
Reference no: EM131268731

Write a class with a constructor that accepts a String object as its argument. The class should have a method that returns the number of vowels in the string, and another method that returns the number of consonants in the string. Demonstrate the class in a program that performs the following steps:

1. The user is asked to enter a string.

2. The program displays the following menu:

a. Count the number of vowels in the string

b. Count the number of consonants in the string

c. Count both the vowels and consonants in the string

d. Enter another string

e. Exit the program

3. The program performs the operation selected by the user and repeats until the user selects e, to exit the program.

Reference no: EM131268731

Questions Cloud

What a sustainable system means : Describe in your own words how the interaction of these three themes would result in a sustainable system, as well as what a sustainable system means.
What effects has oprah''s charisma had on her followers : What effects has Oprah's charisma had on her followers?
Write a single statement that assigns the values : Write a single statement that assigns the values 99, 100 and 88 to an integer array named TestScores. Use the C++ notation used for the "lotterynumbers" array.
Nested loops to generate a triangle : Write a program called program41.py that uses a for loop and the range functionto output the numbers from 5 up to 100 - Write another program called program42.py that generates exactly the same output
Method that returns the number of consonants : Write a class with a constructor that accepts a String object as its argument. The class should have a method that returns the number of vowels in the string, and another method that returns the number of consonants in the string. Demonstrate the ..
Input two arrays of information : Write a program that will input two arrays of information. Each array will contain exactly 4floating point values. Your program will enter these values from standard input.
Malloc up space for a one-dimensional array of n integers : Write a program that will first read in a positive integer number, say n, from standard input. Then you need to create enough space in the heap via a call to malloc to hold an array of n integers.You then need to use array index operators to fill ..
How fast is its daily cost for hamburgers increasing : If the restaurant s daily sales are increasing at the rate of 30 hamburgers per day, how fast is its daily cost for hamburgers increasing?
Determine the average of some integers : Write a program named program43.py that uses nested loops to generate a triangle as shown in the sample run. The program should begin by prompting the user to enter the number of lines in the triangle.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Show that the time efficiency of solving coin-row problem

Apply the dynamic programming algorithm to find all the solutions to the change-making problem for the denominations 1, 3, 5 and the amount n = 9.

  Fit a poison regression model to relate success

Show that the logistic model gives a better fit than the Poisson regression which the kick is taken. Use Attempts as offset (See Page 347). distance from which the kick is taken. model.

  Evaluate the design and development process

Balsamiq and Axure are commercial products that evaluate the design and development process. Select either Balsamig or Axure and describe a situation where that tool would be more effective than the other. Justify your response

  What are the values of a b and c after the following code

What are the values of a, b, and c after the following code statements

  Determine the volumetric flow rate for frictionless flow

Oil (SG 0.9) flows downward through a vertical pipe contraction as shown in Fig. P12.35. If the mercury manometer reading, h, is 120 mm, determine the volumetric flow rate for frictionless flow. Is the actual flow rate more or less than the fricti..

  Create logic circuit which will decode dtmf-like keypad

Create the logic circuit which will decode the DTMF-like keypad. The keypad comprises of 16 keys, numbered 0 to 9, *, #, A, B, C, and D.

  What might happen to the existing reserved flows

What will happen to the existing reserved flows if the router handles reserved and nonreserved flows via a single FIFO queue?

  Expalin programs like ping and some of scanning tools

When using programs such as ping and some of the scanning tools to do forensic investigations, we may easily tip off the suspect that is under investigation

  Does this substantially affect the way we view the world

Does this have a stimulating effect by raising awareness of the important issues in our world today, and encourage greater, more free discussion? Or does it have a chilling effect by creating groups of users that simply reinforce each others' narr..

  What extent do specific technologies help companies

More generally, to what extent do specific technologies help companies gain an edge over their competitors? How easy or difficult would it be to initiate such advantages

  How do you remember order of operations

How do you remember order of operations? If you use a calculator for computation, is order of operations still important? Why or why not? What are some of the possible outcomes when order of operations is ignored?

  Create table in datasheet view to store vendor company data

Create a table in Datasheet view to store vendor company data. On the Create tab, in the Tables group, click the Table button. You are now in the Datasheet view of a new table. Notice that Access has created a new field named ID with the AutoNumber d..

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