Question: Problem 1 - String Operations - 4 0 pointsDr. Bizzarus is on a mission. He is approaching people on the street and asking them to

Problem 1- String Operations -40 pointsDr. Bizzarus is on a mission. He is approaching people on the street and asking them to write a sentenceof their choice on a notepad. He is then going to generate statistics on the string. He wants to know theway they volunteers space out their strings, the number of hexadecimal numeral characters, and thenumber of matched upper and lowercase characters found in the string. However, he is completely out of2
his depth with string processing and has just hired you to write a C++ program for him.This program has to use C++ string objects, and not C-strings.Specifications Call this program stringops.cpp Write a function called spaceCount that takes in a string as a parameter and returns the number ofwhitespace characters in the string. (6 points) Write a function called digitCount that takes in a string as a parameter and returns the number ofhexadecimal numeral characters in the string. (6 points) Write a function called caseMatchCount that takes in a string as a parameter and returns thenumber of matched lower and uppercase characters in the string. Each matched character pair mustbe counted only once. That is, if you have a string HELLO World, you will have 2 matchedcharacters - l and o. The ls should not be counted twice. You will be allowed the use of parallelarrays for this. (13 points) In the main function, accept a # terminated string from the user. Then, print all the 3 statisticsof the string. Repeat until the user enters Done.(10 points) Please comment your code appropriately. (5 points) You are restricted to the iostream, cctype and string libraries for this program. You are not allowed to use the string class iterators like begin, end, rbegin, rend, etc. The text entered may contain stray whitespace.Sample RunRegular text is whats printed by your program. Underlined text is user input, shown here as a sample.You will not be printing the underlined parts in your program.Enter the string: Maybe a story will cheer you up.Once upon a time there was an UglyBarnacle. He was so ugly, that everyone died.the end.#Number of whitespace charcaters: 31Number of hexadecimal digits: 32Number of matched characters: 5Enter the string: Who are you 50 people?!!#Number of whitespace characters: 4Number of hexadecimal digits: 6Number of matched characters: 0Enter the string: Done#

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!