Question: Please help in Java. I'm trying to code a censor code which should follow all the rules given below after the user inputs his passage
Please help in Java. I'm trying to code a censor code which should follow all the rules given below after the user inputs his passage to be censored. Please help and I will rate good for sure. I'm failing again and again to meet all the rquirments. I hope you will help.
RULES:
- Words may be censored with X's if they are surrounded by whitespace and Words may be at the beginning and end of the String
- Words may be followed by a period, comma, question mark or exclamation point (.,?!). This is only true if these characters come after the Word! - Words that are part of a larger word should not be censored. (i.e. wood and woodchuck from the example above)
eg:
USER INPUT:
Jack is smart. Jack cannont do jumpingjacks. He is called The big Jack!!
Word to be censored:
Jack
Censored passage:
XXXX is smart. XXXX cannot do jumpingjacks. He is called The big XXXX!!.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
