Output a message for each abbreviation that is expanded


(1) Use scnr.nextLine(); to get a line of user input into a string. Output that line.

Ex:
Enter text: IDK how that happened. TTYL.
You entered: IDK how that happened. TTYL.

(2) Expand common text message abbreviations. Output a message for each abbreviation that is expanded, then output the expanded line. Note: Check for abbreviations in the order provided below.
Support these abbreviations (you only need to support these):
BFF -- best friend forever
IDK -- I don't know
JK -- just kidding
TMI -- too much information
TTYL -- talk to you later
Ex:
Enter text: IDK how that happened. TTYL.
You entered: IDK how that happened. TTYL.

Replaced "IDK" with "I don't know".
Replaced "TTYL" with "talk to you later".

Expanded: I don't know how that happened. talk to you later.

What's wrong with my code?

Attachment:- TextMsgExpander.rar

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Output a message for each abbreviation that is expanded
Reference No:- TGS02374227

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)