Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Object Oriented Programming ( C++) The purpose of this C++ programming assignment is to generate statistics from a given input text (i.e. a string). From
Object Oriented Programming ( C++)
The purpose of this C++ programming assignment is to generate statistics from a given input text (i.e. 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 if 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 puneCount 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 0 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started