Question
In Java... Create a program that will translate user input into the 90s slang. Input: Read in a text file provided by the user and
In Java...
Create a program that will translate user input into the 90s slang.
Input: Read in a text file provided by the user and translate each line individually.
Input File:
Glory is fleeting, but obscurity is forever. The whole problem with the world is that fools and fanatics are always so certain of themselves, and wiser people so full of doubts. Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. Do, or do not. There is no 'try'. Et tu, Brute? Cool story, bro. All right, Mr. DeMille, I'm ready for my close-up.
Output: Write a new text file with the translated text line by line.
Problem Description: The 90s slang for this assignment has the following rules.
1. If a word has 3 or fewer letters, it does not change. 2. If the word is cool, awesome, or fun, it is changed to fly. 3. If the word is for, the r is ignored. 4. If the word is sure, it is replaced with sho. 5. There is a 50% chance that the translated phrase will begin with Yo!. 6. All other words should be changed as follows: a. Take all the beginning consonants. b. Replace the rest of the word with izzle. 7. If the sentence goes on too long ( > 10 words), replace all input after the 10th word with yadda, yadda, yadda 8. Keep punctuation. Deliverables
Sample Translations Hello world Hizzle wizzle Hello world for sure Yo! Hizzle wizzle fo sho
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started