Question: Hi, could use some help with this question. Would like to have a completed version that I can use as a reference to check my

Hi, could use some help with this question. Would like to have a completed version that I can use as a reference to check my progress when working on it myself. Thanks! Question is attached.

Hi, could use some help with this question. Would like to havea completed version that I can use as a reference to checkmy progress when working on it myself. Thanks! Question is attached. \f44

\f44 void tokenize(const string& s, vector& tokens) 45 46 int tokenStart = 0; // Starting position of the next token 47 48 // Find the first occurrence of the delimiter. 49 int delim = s.find(' '); 50 51 // While we haven't run out of delimiters... 52 while (delim != string: :npos) 53 54 // Extract the token. . . substring 55 string tok = s. substr (tokenStart, delim - tokenStart); 56 57 // Push the token onto the tokens vector. 58 if(tok != "") //if the user enters multiple spaces, skip 59 tokens. push_back(tok); 60 61 // Move delim to the next character position. 62 delim++; 63 64 // Move tokenStart to delim. 65 tokenStart = delim; 66 67 // Find the next occurrence of the delimiter staring from the current position. 68 delim = s.find(' ', delim); 69 70 //If no more delimiters, extract the last token. 71 / /Modifed Pr10-23. cpp: 72 //The if condition is moved outside the loop in case there is only one token 73 if (delim == string: :npos) 74 // Extract the token. 76 //string tok = s. substr(tokenStart, delim - tokenStart); //this also works 77 string tok = s. substr(tokenStart, (s. length() ) - tokenStart); 78 79 // Push the token onto the vector. 80 tokens . push_back(tok); 81 82 83 84 int spaceCount (string userInput) 85 86 / /write the function 87 88 string unpunct(string) 89 90 / /write the function 91 97You must use the le: encryptionmpp The program prompts the user for a text to be encrypted. The text is encrypted using the following algorithm: - All punctuations are removed. Punctuation includes oom mas\". dots\". question marks{?l, exclamation marksll}. semicolons m. hyphen 1-}. and colonsi:l - If the string has a length less than or equal to 3: reverse the order of the letters in the string and add a 'zw' to the beginning and T to the end of the string. Example: is ) >si[ If the string begins with a vowel: move the last 3 characters to the beginning of the string then add the '@' symbol followed by the rest of the letters. Example: adjust } ustigiiadj - If the string starts with a consonant: move the first 3 characters to the end of the string and add the "" symbol to the end. Example: Hello 4; IoHeI\" A tokenizing function should he used first {already included in encryptlomcppl, it uses the space ' ' as a delimiter. For example: "Hi. everyone! This is the Island University.", has 5 space delimiters -) F tokens. Sample Run: Please EtEP a text: Hi, everyone! This is the Island University. The text you entered has 1" tokens. After removing the punctuation: Hi everyone This is the Island University The encrypted tokens: >iH[ on eevery SThi' >si[ >eht[ andIsl itylnivers The encrypted text: >1H[oneeverysThi*>si[>eht[and@IslityQUnivers

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!