Question: Write a C + + program that will collapse a sentence into less characters, but make sure it is still readable Prompt the user for

Write a C++ program that will collapse a sentence into less characters, but make sure it is still readable
Prompt the user for a line of input
Remove all commas, periods, question marks, and double quotes
Remove all spaces and tabs. While the whitespace is being removed, capitalize the first character after the whitespace
Make sure that your program works properly for multiple spaces/tabs at the beginning of the line, between the words, and at the end of the line
Output the final line between a set of parentheses, "(" and ")"
REQUIREMENTS:
You may NOT use arrays or vectors in this program, only string, integral (such as int), and bool data types
You may ONLY use the string functions from the chapter. You may NOT use other string functions. For example, you may NOT use the + operator to add to a string.
strVar.at(index)
strVar[index]
strVar.append(n, ch)
strVar.append(str)
strVar.clear()
strVar.compare(str)
strVar.empty()
strVar.erase()
strVar.erase(pos, n)
strVar.find(str)
strVar.find(str, pos);
strVar.find_first_of(str, pos)
strVar.find_first_not_of(str, pos)
strVar.insert(pos, n, ch);
strVar.insert(pos, str);
strVar.length()
strVar.replace(pos, n, str);
strVar.substr(pos, len)
strVar.size()
strVar.swap(str1)
Sample Run #1(bold, underlined text is what the user types):
Line? this is "C++" class numbered 2334
(thisIsC++ClassNumbered2334)
Test #1 checks all output
Mini Test #2- output includes "thisIsC" for first few words
Mini Test #3- output includes "C++Class" for middle words
Sample Run #2(bold, underlined text is what the user types):
Line? more , and . Here ?

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 Programming Questions!