Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Arrays, Binary Search, I/O Streams, Exceptions Read in a text file from standard input, censor it, and print out the result to standard output.

Uses: Arrays, Binary Search, I/O Streams, Exceptions

 Read in a text file from standard input, censor it, and print out the result to standard output. To censor the file, first read in a list of words from the file "banned.txt". There will be one word per line in the file. Read in the words until the end of file is reached. If any of the banned words occurs in the text file, replace that word by a string of asterisks ('*') equal in length to the censored word. For example if the word "firehouse" is in the banned word list, then all instances of the word "firehouse" in the input would be replaced by "*********" in the output. Other words should be printed out as read in, that is, not changed.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question