Question: Object Oriented Programming ( C ++ ) The purpose of this C++ programming assignment is to generate statistics from a given input text (i.c. a
The purpose of this C++ programming assignment is to generate statistics from a given input text (i.c. a string). From this input text, we need know the number of words, the number of vowels, the number of punctuation characters and to check the string "you" is existed in this text. To accomplish this assignment, you must do the following: Write a function called wordCounter that takes in a string as a parameter and returns the number of words in the string (hint: you can count spaces). Write a function called vowelcounter that takes in a string as a parameter and returns the total number of vowels in the string. You need to account for upper and lowercase letters. . Write a function called puncCount that takes in a string as a parameter and returns the number of punctuation characters in the string. Write a function called findSubString that takes in a string as a parameter and returns 1 if the string "you" exists in the string and if it is not In the main function, input the string from the user. Then, print all the 4 statistics based on this input string Sample Run 1 Enter the input string: Maybe a story will cheer you up: Once upon a time, there was an ugly barnacle. It was so ugly, that everyone died. The end. Number of words: 25 Number of vowels: 38 Number of punctuations: 6 "you" is a part of this string Sample Run 2 Enter the input string: Boating school?! I thought this was Spanish class! Number of words: 8 Number of vowels: 13 Number of punctuations: 3 "you" is not a part of this string
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
