Get Instant Help From 5000+ Experts For
question

Writing: Get your essay and assignment written from scratch by PhD expert

Rewriting: Paraphrase or rewrite your friend's essay with similar meaning at reduced cost

Editing:Proofread your work by experts and improve grade at Lowest cost

And Improve Your Grades
myassignmenthelp.com
loader
Phone no. Missing!

Enter phone no. to receive critical updates and urgent messages !

Attach file

Error goes here

Files Missing!

Please upload all relevant files for quick & complete assistance.

Guaranteed Higher Grade!
Free Quote
wave
Program to count vowels, consonants, uppercase letters, lowercase letters, punctuation characters an
Answered

Task

Due Date: Sunday March 21, 2021 at 11 PM (PDT)

Submit via Vocareum

Write a program that asks the user to enter some text and then counts the number of vowels, consonants, uppercase letters, lowercase letters, punctuation characters, and words.

Your program must:

1. Ask the user to enter some text consisting only of letters, spaces, and the following punctuation characters . , ; : ! ?

2. The user will signal the end of the text by typing enter/return.

3. Use a string object to store the entered text (not a C-style string).

4. Determine how many of the characters in the text entered are:

a. Vowels

b. Consonants

c. Uppercase

d. Lowercase

e. Punctuation (. , : ; ! ?)

5. Determine the number of words in the text.

6. For the purpose of this assignment, vowels are a, e, i, o, u (or A, E, I, O, U). All other letters (including y and Y) are consonants.

7. For the purpose of this assignment a word is any group of one or more  characters (letters and/or . , ; : ! ?) separated by one or more spaces from any other group of one or more characters. A group of one or more punctuation marks is also counted as a word.

8. Display the number of vowels, consonants, uppercase letters, lowercase letters, punctuation characters, and words.

NOTE: The starter code in your Vocareum account contains nine cout statements. You must use these nine cout statements exactly as they are given. Do NOT modify these statements. Do NOT change the order of these cout statements. Do NOT add additional cout statements.

NOTE: The user may enter one or more spaces at the start and/or end of the text. Your code must be able to handle this scenario.

Before you submit your program, make sure you test it with a variety of different texts. The following are examples of correct execution of the program.APSC 177

Enter some text. Letters and the following punctuation only please . ,

: ; ! ?

Pressing enter/return will end the text.

This is a test!

The number of vowels is: 4

The number of consonants is: 7

The number of uppercase letters is: 1

The number of lowercase letters is: 10

The number of punctuation characters is: 1

The number of words is: 4

Exiting program ...

Enter some text. Letters and the following punctuation only please . ,

: ; ! ?

Pressing enter/return will end the text.

Another test.

The number of vowels is: 4

The number of consonants is: 7

The number of uppercase letters is: 1

The number of lowercase letters is: 10

The number of punctuation characters is: 1

The number of words is: 2

Exiting program ...

Enter some text. Letters and the following punctuation only please . ,

: ; ! ?

Pressing enter/return will end the text.

Still another test !!!

The number of vowels is: 5

The number of consonants is: 11

The number of uppercase letters is: 1

The number of lowercase letters is: 15

The number of punctuation characters is: 3

The number of words is: 4

Exiting program ...

Enter some text. Letters and the following punctuation only please . ,

: ; ! ?

Pressing enter/return will end the text.

This, however, is the LAST.

The number of vowels is: 7

The number of consonants is: 13

The number of uppercase letters is: 5

The number of lowercase letters is: 15

The number of punctuation characters is: 3

The number of words is: 5

Exiting program ...

See the Work directory in your Vocareum account for starter code in a file called Assignment7.cpp. Write your program in this file. Note that the name of this file MUST remain Assignment7.cpp in order for the Build, Run, and Submit operations to work. It will be your final submission before 11 PM (PDT) on Sunday March 21, 2021 that will be graded.

Assignments submitted after the submission deadline (11 PM (PDT) Sunday March 21, 2021 for Assignment 7), but within 24 hours of the deadline, will be marked and will incur a penalty equal to 50% of the score earned on the assignment. Assignments submitted more than 24 hours after the submission deadline receive a grade of zero.

support
close