Demonstrate the class in a program

Assignment Help Basic Computer Science
Reference no: EM131275261

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: EM131275261

What are the sequence number source port number

In the second segment sent from A to B, what are the sequence number, source port number and destination port number? If the first segment arrives before the second segment, i

Bank for reimbursement claiming the bank

The couple made a claim against its bank for reimbursement claiming the bank was not authorized to pay these checks because they had not been effectively negotiated to the b

Network mask for equally sized subnets

A site with a netid of uses 20 subnet routers. Suggest a suitable network mask for equally sized subnets, which allows for a degree of expansion in the future.

Examine the significant effect

Identify two (2) types of staffing models that could apply to your chosen scenario and determine which model would be best suited for efficiency, productivity, and possible

Given treasury bill was sold

The given treasury bill was sold in April of this year. Find (i) the price of the T-Bill, and (ii) the actual interest rate paid by the treasury. Round dollars to the neares

Is there any regularity to this amount of time

How many links do you have to add for this to occur? Run the model several times and examine how many ticks it takes to have all the nodes be part of the giant component. Is

Integral part of learning

Remember that discussions are an integral part of your learning. Expressing and sharing your ideas based on knowledge learned, expands everyone's learning experience. This i

Personal ethics-professional ethics

Discuss how "Personal Ethics" differ from "Professional Ethics". What do you think about these differences? How does aspirational ethics contribute to the attraction of engi


Write a Review

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