Question: Write a complete C++ program that does the following. and please include the comments to explain what you did. thankyou! Extend your part 4 program
Write a complete C++ program that does the following. and please include the comments to explain what you did. thankyou!

Extend your part 4 program to prompt the user for a sentence, parse it into separate words, removing any punctuation, and print them in sorted order. Then prompt the user for a short substring (such as "the") and find all occurrences of the substring which are NOT complete words. For example, it should find "the" in theory" and "withering", but not the other "the"s in the sentence "I put the withering plant in the sun and watered it; in theory, it should recover in an hour or so. And in parsing the sentence into words, itshould remove the commas, semicolon and period. Because you have to sort the words afterfinding them, you'll need an array of strings for this. You can declare an array of strings of size 100, and assume your user will be too lazy to give you a sentence 100 words long. or, ifyou're in the mood for a little digging, read up on C++ vectors in section 7.3 ofthe textbook; instead of an array, you could create a vector of strings vector string> v; and use v. push back Like C++ strings, C++ vectors work the same as arrays lyou can index them with However, note that if you use a vector of strings, you need to use sort (v begin. v.end to sort the vector, rather than serttv, v 10) Email me if you get the challenge done, and send me your challenge code, as well as uploading it to BlackBoard. Prizes for the first challenge solution in each section. If you've already won the challenge once, you can still win it if no one else in the section turns in a solution
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
