Question: I NEED 3 SEPERATE PROGRAMS FOR THIS EACH STEP IS ITS OWN PROGRAM Tweet decoder In this assignment, youll decode Twitter messages that include Internet

I NEED 3 SEPERATE PROGRAMS FOR THIS

EACH STEP IS ITS OWN PROGRAM

Tweet decoder In this assignment, youll decode Twitter messages that include Internet abbreviations, such as LOL and IRL. The starter program decodes two abbreviations.

1. Expand the number of abbreviations that can be decoded to include the following:

AFK = away from keyboard

NVM = never mind

BFF = best friends forever

FTW = for the win

IIRC = if I recall correctly

TTYL = talk to you later

IMHO = in my humble opinion

Save your solution for this step in a file named step1.cpp. Youll need to submit each step as a separate file.

2. Allow the user to enter a complete tweet (160 characters or less) as a single line of text. Use getline to get the single line of text then resize (or truncate) to 160 characters. Search the resulting string (using strings find function) for those common abbreviations and print a list of each abbreviation along with its decoded meaning. Save your solution for this step in a file named step2.cpp. Youll need to submit each step as a separate file.

3. Convert the user's tweet to a decoded tweet, replacing the abbreviations directly within the tweet. You only need to replace the first instance of a particular abbreviation. Save your solution for this step in a file named step3.cpp. Youll need to submit each step as a separate file. Here is an example program execution for step 3 (user input is highlighted here for clarity): Entertweet:I'mgoingtohangoutwithmyBFFIRLtomorrow. Decodedtweet:I'mgoingtohangoutwithmybestfriendsforeverinreallife tomorrow. Another example execution for step 3 (user input is highlighted here for clarity):

Entertweet:So, IMHO he was going FTW, but I was so LOL that my BFF thought I was going to start crying IRL! Anyway, got ta go, TTYL ... I'm going AFK. Decodedtweet:So, in my humble opinion he was going for the win, but I was so laughing out loud that my best friends forever thought I was going to start crying in real life ! Anyway, got ta go, talk to you later ... I'm going away from key board. This tweet has over 160 characters and gets truncated (user input is highlighted here for clarity): Entertweet:Anypeopleanywhere,beinginclinedandhavingthepower,have therighttoriseup,andshakeofftheexistinggovernment,andformanew onethatsuitsthembetter.Thisisamostvaluable-amostsacredright-a right,whichwehopeandbelieve,istoliberatetheworld.-AbrahamLincoln. Decodedtweet:Anypeopleanywhere,beinginclinedandhavingthepower,have therighttoriseup,andshakeofftheexistinggovernment,andformanew onethatsuitsthemb

STARTER CODE

 #include  #include  using namespace std; int main() { string tweet; cout << "Enter abbreviation from tweet: "; cin >> tweet; // Output decoded abbreviation from tweet if (tweet == "LOL") { cout << "LOL = laughing out loud" << endl; } else if (tweet == "IRL") { cout << "IRL = in real life" << endl; } else { cout << "Sorry, don't know that one." << endl; } return 0; } 

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!