Objective: Edit the TextMessageDecoder Java class to promt for a sentance with Enter text: then take the sentance with an abreviation such as IDK, BFF, JK, TMI, TTYL, then print the sentance back to the screen and list the meaning of all the abreviations

Anonymous
timer Asked: Jan 31st, 2021

Question Description

I'm working on a javascript exercise and need guidance to help me study.

Example:

If the input is:

Enter text:
IDK if I'll go. It's my BFF's birthday. 

Then the output will be:

You entered: IDK if I'll go. It's my BFF's birthday. 
BFF: best friend forever
IDK: I don't know

Some Notes on how you might approach this problem are below:

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

Ex:

Enter text:
IDK if I'll go. It's my BFF's birthday. 
You entered: IDK if I'll go. It's my BFF's birthday.

(2) Search the string (using indexOf()) for common abbreviations and print a list of each found abbreviation along with its decoded meaning.

Ex:

Enter text:
IDK if I'll go. It's my BFF's birthday. 
You entered: IDK if I'll go. It's my BFF's birthday. 
BFF: best friend forever
IDK: I don't know

Support these abbreviations:

  • BFF -- best friend forever
  • IDK -- I don't know
  • JK -- just kidding
  • TMI -- too much information
  • TTYL -- talk to you later
  • There are many files in this repository and we will go through what each of them does in class, but the only one you need to edit is TextMessageDecoder.java.
  • Each time you save your code in this repository a series of tests will be run against your code in a container. To see if your code passed all the tests and is ready to submit, go to the 'Actions' tab of your repository and see if the last commit passed all the tests. If it did, there will be a green checkmark by the last commit, otherwise there will be a red x.
  • If you're not sure why your commit didn't pass the tests, click into the commit in the actions tab and then click 'autograding'. You will be able to see the output of the test and use this to determine what went wrong. If you need help, post on Slack!
  • use this script to start

import java.util.Scanner;

public class TextMessageDecoder {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
/* Type your code here. */
}

}

WRITTEN IN JAVA

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors