Problem

Write a method called leetSpeak that accepts two parameters: a Scanner representing an inp...

Write a method called leetSpeak that accepts two parameters: a Scanner representing an input file, and a PrintStream representing an output file. Convert the input file’s text to “leet speak,” where various letters are replaced by other letters/numbers, and output the new text to the given output file. Replace "o" with "0", "l" (lowercase “L”) with "1" (the number one), "e" with "3", "a" with "4", "t" with "7", and an "s" at the end of a word with "Z". Preserve the original line breaks from the input. Also wrap each word of input in parentheses. For example, if the input file contains the following text:

four score andseven years ago ourfathers brought forth on this continenta new nation

For the input above, your method should produce the following in the output file:

(f0ur) (sc0r3) (4nd)(s3v3n) (y34rZ) (4g0) (0ur)(f47h3rZ) (br0ugh7) (f0r7h) (0n) (7hiZ) (c0n7in3n7)(4) (n3w) (n47i0n)

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 6
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT