Question: please do in java and so i can copy paste The Challenge Loop to display a menu that will ask the user to choose 1

please do in java and so i can copy paste
please do in java and so i can copy paste The Challenge
Loop to display a menu that will ask the user to choose
1 of 3 options: 1. Encryption - Enter a password to see

The Challenge Loop to display a menu that will ask the user to choose 1 of 3 options: 1. Encryption - Enter a password to see what it looks like scrambled. 2. Decryption - Enter an encrypted word to see what it looks like unscrambled. 3. End Caesar Cipher When the user enters option 1, call the encryption method which will: + ask the user for the word to encrypt and a number between 1, 2 or 3 to use as the shift amount. Apply the algorithm to shift forward, & then display the encrypted word. When the user enters option 2, call the decryption method which will: + ask the user for the encrypted word to decrypt and a number between 1, 2, or 3 to use as the shift amount. Apply the algorithm to shift backward, & then display the decrypted word. When the user enters option 3, advise the user to that this program will self-destruct in seconds, and display "Good-bye! Keep the Caesar Cipher Secret!" The purpose of this challenge is to get you to see how useful your String manipulation skills can be especially if you were Julius Caesar trying to decrypt a message intercepted from the enemy.. Encryption is the process of encoding messages to keep them secret, and decryption is the process of reversing encryption and putting the encrypted message back to the original text. Did you know that the Caesar Cipher is one of the first techniques ever used to perform encryption? It shifts the alphabet by a certain number of letters, so the original message appears encrypted. You are a specialized Java programmer, and a Caesar Cipher Cryptographer. Your mission, should you choose to accept it, is to encrypt the user's secret word using the Caesar Cipher, shifting all the letters to the right by a number between 1, 2 or 3, depending on what your user requested. So, you must ask you user for a word to encrypt AND the shift amount (a number between 1, 2 or 3). That number will be stored in a variable called shiftNum. The following chart depicts the shifting pattern if the shiftNum is 2: *a=-=> ' (the letter 'a' becomes a 'c) 'b' ===> 'd' (the letter 'b' becomes a 'd') etc., All the letters will be shifted by a number between 1, 2, or 3, depending on the value inside shiftNum. Here is a code snippet to help you get started on the encryption method in the Domain class called Password Encryption: System.out.println("What is the secret word to encrypt?"); String secretWord = keyboard.next(); String scrambled Message = ""; char letter, newLetter, Int newLetter Num; For or While Loop Pseudo Code: 1. For the sake of simplicity, please convert the secret Word to all UPPER case letters. 2. Get each letter in the secretWord at index i, while I secretWord length a.) letter - secretWord.charAt(i); 3 Convert the letter to an int, adding shiftNum to it, then convert it back to a char: 3. Convert the letter to an int, adding shiftNum to it, then convert it back to a char: newLetterNum = ( (int) letter ) + shiftNum; newletter = (char) newLetterNum; *This works because each letter has a positive integer assigned to it: http://www.asciitable.com/ 4. Concatenate the newLetter the scrambled Message: scrambled Message += newLetter; After loop is over, the scrambled Message should be saved into the instance variable called encryptWord. Back in the driver class, display the original secretWord and the scrambled Message. Using the above encryption algorithm, how would you reverse it, to get the scrambled message back to the secretWord? That logic goes in the decryption method. The Challenge

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!