Question: Project SecretStrings This project will give you practice with looping, conditionals, strings. You are asked to implement a program which reads input from the user
Project SecretStrings
This project will give you practice with looping, conditionals, strings. You are asked to implement a program which reads input from the user line-by-line which has been marked with tags indicating that certain text should be redacted by replacing the characters of the tokens with asterisks. You may imagine this as a tool for converting secret documents into something appropriate for public release.
Project Requirements: -
Your program should read a line of input from the user, process it accordingly, and display the result to the screen. This process should continue until the user enters the letter q on a line by itself, at which point your program should terminate.
You should redact text by replacing affected alphanumeric characters (i.e., letters and digits) with asterisks. Punctuation and whitespace should not be affected. You may find the built-in Java method Character.isLetterOrDigit helpful.
Text to be redacted will appear between the tags < r > and < /r >. These tags may appear anywhere in the line, and any line may contain zero, one, or more redacted segments. Tags in the input text will always be balanced and will not be nested. Tags will not appear in the middle of words.
Your program must be appropriately documented and have reasonable style and indentation. At a minimum, you must include a block comment at the top of your source file which indicates your name, email address, the date of completion, and that it is a solution to Project SecretStrings.
Lastly, you should write a short README.txt file that describes the status of your program at the time of submission. The readme file should include your name, the date and project number, and a high-level description of your algorithm, and indicate whether or not there are any known bugs. The purpose of the readme is to give you practice explaining code to other humans. It is OK if your readme file is brief.
Examples of Program Input and Output: -
This is < r >an example of< /r > redaction.
Sometimes < r >there< /r > will be < r >more than one region< /r >
Sometimes there will be zero.
These three lines should be transformed to the following:
This is ** ******* ** redaction.
Sometimes ***** will be **** **** *** ******.
Sometimes there will be zero.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
