QuestionQuestion

(SMS Language) Short Message Service (SMS) is a communications service that allows sending text messages of 160 or fewer characters between mobile phones. With the proliferation of mobile phone use worldwide, SMS is being used in many developing nations for political purposes (e.g., voicing opinions and opposition), reporting news about natural disasters, and so on.
Since the length of SMS messages is limited, SMS Language—abbreviations of common words and phrases in mobile text messages, emails, instant messages, etc.—is often used.
For example, “in my opinion” is “imo” in SMS Language.
Research SMS Language online. Write a GUI application in which the user can enter a message using SMS Language, then click a button to translate it into English (or your own language).
Also provide a mechanism to translate text written in English (or your own language) into SMS Language. One potential problem is that one SMS abbreviation could expand into a variety of phrases.
For example, IMO (as used above) could also stand for “International Maritime Organization,” “in memory of,” etc.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;
import javax.swing.JList;
import javax.swing.JOptionPane;

/**
*
* @author
*/
public class Main {
   
    static ArrayList< String > sms = new ArrayList< String >();
    static ArrayList< String > meaning = new ArrayList< String >();
   
    public static void readDictionary()
    {
       File file = new File("dictionary.txt");
       boolean flag = false;
      
       try {

            Scanner scanner = new Scanner(file);
            flag = true;
            String delims = ":";
            String line;
            while (scanner.hasNextLine()) {
                line = scanner.nextLine();
            //    System.out.println(line);
                String[] tokens = line.split(delims);
               sms.add(tokens[0]);
               meaning.add(tokens[1].toLowerCase());
            }
            scanner.close();
       } catch (FileNotFoundException e) {
            e.printStackTrace();
       }
    }
   
    static String S2E(String message)
    {
       String m = message.toUpperCase();
       for (int i = 0; i < sms.size(); i++) {
            if (m.equals(sms.get(i))) {
                return meaning.get(i);
            }
       }
       return message;
    }...
$45.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats