Question: import java.util.Scanner; public class TweetDecoder { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String origTweet = ; System.out.println(Enter abbreviation from tweet:
import java.util.Scanner;
public class TweetDecoder {
public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String origTweet = "";
System.out.println("Enter abbreviation from tweet: "); origTweet = scnr.next(); System.out.println("You entered " + origTweet); /* FIXME: Add all the possible misspellings for each of the supported abbreviations. Note the number of combinations for each 3-letter abbreviation? */ if (origTweet.equals("LOL")) { System.out.println("LOL = laughing out loud"); } else if (origTweet.equals("BFN")) { System.out.println("BFN = bye for now"); } else if (origTweet.equals("FTW")) { System.out.println("FTW = for the win"); } else if (origTweet.equals("IRL")) { System.out.println("IRL = in real life"); } else { System.out.println("Sorry, don't know that one."); } return; } }
For abbreviations that do not match the supported abbreviations, check for common misspellings. Provide a suggestion for correct abbreviation along with the decoded meaning.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
