Question: Implement in C++ Al udo-code for Exercise 2 1. This exercise is more complicated than it looks. You cannot just use a string variable and

 Implement in C++ Al udo-code for Exercise 2 1. This exerciseis more complicated than it looks. You cannot just use a string

Implement in C++

Al udo-code for Exercise 2 1. This exercise is more complicated than it looks. You cannot just use a string variable and use t such as comma or period .', that you don't want to be included in a string. So you will have to read in a character at a time and decide whether it is an alphabet or not. So it is convenient that you define the following function: o read a string at a time since there are punctuation marks, bool IsAlphabet(char ch); 2. Read in one character at a time, check if it is an alphabet, if so, concatenate it to the current word, using a string "operator, for example. When you finish building a word, you can then work on the replacement as in the next step. string word-" Read a word containing alphabets only while true) cin.get(next symbol); if (is alphabet next symbol)) word wordnextsymbol; else cin putback(next symool); break; 3. Define a replacement function by checking the input string to be one of the "sexist" words. If so, change the word to be the a-sexist version. Remember to handle if the word is capitalized or not. Al udo-code for Exercise 2 1. This exercise is more complicated than it looks. You cannot just use a string variable and use t such as comma or period .', that you don't want to be included in a string. So you will have to read in a character at a time and decide whether it is an alphabet or not. So it is convenient that you define the following function: o read a string at a time since there are punctuation marks, bool IsAlphabet(char ch); 2. Read in one character at a time, check if it is an alphabet, if so, concatenate it to the current word, using a string "operator, for example. When you finish building a word, you can then work on the replacement as in the next step. string word-" Read a word containing alphabets only while true) cin.get(next symbol); if (is alphabet next symbol)) word wordnextsymbol; else cin putback(next symool); break; 3. Define a replacement function by checking the input string to be one of the "sexist" words. If so, change the word to be the a-sexist version. Remember to handle if the word is capitalized or not

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!