Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Start with the supplied code template, editing the top of program comment to include your FULL NAME.
- Extend the template code as follows:
- (1) Use nextLine() with your Scanner object variable to get one line of user input into a string (no prompt necessary).
- Output the line.
- Example:
- 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()) to find the common abbreviations listed below
- and print a list of each found abbreviation along with its decoded meaning.
- NOTE: Each abbreviation will appear no more than once in the text.
- Example:
- 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 (searching for them, in the order listed):
- BFF -- best friend forever
- IDK -- I don't know
- JK -- just kidding
- LOL -- laughing out loud
- TTYL -- talk to you later
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement