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

  Which kinds of computing and information systems

Which kinds of computing and information systems do users really need to care about underlying technologies? Which kinds of users ought to pay more attention how well a variety of devices and applications work together (and how seamlessly)? Do you wa..

  What is an array and why are they important in programming

What is a multi dimensional arrays. What purposes can you think of for multi dimensional arrays.

  How the token buckets and wfqs can be used together

Summarize how the token buckets and WFQs can be used together to provide policing mechanisms.

  What is your os update strategy

Which operating system do you use?- Why do you use this OS and what features do you appreciate?- What challenges have you experienced, which you attribute to your choice of OS?

  Process and ways to handle problems

As part of the training process, your manager would like to evaluate how effective you are at this task, and asked that you complete a project: creating a three-part manual that shows a user how to build a computer, using a list of specifications...

  In a contract for software or programming services

In a contract for software or programming services, name and describe the terms and conditions that should be included.

  Internet protocol version 4 (ipv4) is the fourth revision

Internet Protocol version 4 (IPv4) is the fourth revision in the development of the Internet Protocol (IP) and the first version of the protocol to be widely deployed. Together with Internet Protocol version 6 (IPv6), it is at the core of standards-b..

  Flow of control in java

Flow of Control in Java When processing data, it is necessary to make comparisons and validate the information entered. This week those skills will be learned by understanding the if-else and looping statements (while, do-while, and for-loop).

  Create an fsm that interfaces with the data path

Assume that putting a new value onto the address lines M addr causes the memory to almost immediately output the read data on the M data lines. Ignore overflow issues.

  Importe excel worksheet as a table into your access database

Your tasks include importing an existing Excel worksheet as a table into your Access database; modifying the table; creating a relationship between two tables; creating queries with calculated fields, functions, and totals; creating a form for inp..

  Explain what are the right metrics of agility

What are the right metrics of agility. Are there systematic techniques to improve the agility of a system

  Where in the list will the method insert it

where in the list will the method insert it

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