Question: Write a program that prompts a user, using Scanner, for a secret message. The message has its own set of rules you need to use
Write a program that prompts a user, using Scanner, for a secret message. The message has its own set of rules you need to use to decode it. You will use String methods to change the messages you receive from the user.
*Note: Ensure that you make the changes in the order they are specified and do the operations on the updated String
The message will be a combination of the following:
- The first character
- Index 10 to 15 (including 10 to 15)
- Index 20 to 25 (including 20 and 25)
- Index 30 to 35 (including 30 and 35)
- Add an exclamation point at the end
Sample output:
Enter the message:
Akdfhaskdhava aoiera gooadfaod dayxfoy
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
