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

  What types of output and information delivery

What types of output and information delivery would you suggest for the system? Please support answer with references from the Internet. When citing references please do so with APA 6th edition formatting.

  Benefits of binary file called registry

Write down the benefits and disadvantages of configuration in binary file called registry.

  Finding a spanning tree with minimum sum of arc weights

Provide an O(N2), implementation of this algorithm. Hint: Together with the kth fragment Fk, maintain for each j /∈ Fk the node nk(i) ∈ Fk such that the arc connecting j and nk(i) has minimum weight

  Cloud computing to management executives

Your task is to create a presentation that explains cloud computing to management executives who have heard the term cloud computing but do not know what it is or how it can benefit the company.

  Facilitate data exchange functionality in a cloud service en

Database solutions today must be able to adapt and integrate among various computing applications. Determine at least three forms of database connectivity methods that can be used as an interface between applications. For each method you have ..

  Discuss technology literacy assessment

Discuss Technology Literacy Assessment (TLA). In your paper be sure to define TLA and include a discussion of why it is important. Papers should be formatted according to APA standards and should be at least 7-10 pages and at least 6 sources to be co..

  Do they state the same requirements with the same emphasis

Compare and contrast the code with the NSPE code (see Appendix), selecting three or four specific points to discuss. Do they state the same requirements with the same emphasis?

  Setup an information policy for your policy

Would information policy help the company to preventing unintentionally security attack from the employees?, if you were the decision maker of a company, would you like to setup an information policy for your policy?

  Intro internet communication and development

From the Internet Detective, what factors should you consider when evaluating a web-based source for academic research?What characterizes the stage of internet development following Web 2.0?

  Fuel consumption rating and average cost of fuel

Determine the cost to drive each distance at the given fuel consumption rating and average cost of fuel.

  Compute the matrices mtm and mmt

Find the SVD for the original matrix M from parts (b) and (c). Note that there are only two nonzero eigenvalues, so your matrix Σ should have only two singular values, while U and V have only two columns.

  Methods of accessing a command prompt

Question 1. List two methods of accessing a command prompt when Windows 7 is operational. Why might you need to access the command prompt with Run as Administrator?

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