Question: This is java programming(BlueJ).. Please and thank you! CM-111 Spring 2018 Assignment 6: The Cesar Cipher Due 3/8/2018 Background Julilus Caesar is credited with using
This is java programming(BlueJ).. Please and thank you!
CM-111 Spring 2018 Assignment 6: The Cesar Cipher Due 3/8/2018 Background Julilus Caesar is credited with using this simple substitution encoding scheme to protect military messages. Caesar used a key of three to substitute the letters of the original message with the characters three places away in the alphabet. Here is an example A Caesar cipher using a key of 3 and a right shift The original message: Encoded message ATTACK THE ENEMY DWWDFN WKH HQHPB : Since spaces can reveal information to help decipher the code, spaces would be removed Final encoded message: DWWDFNWKHHQHPB With a key of 3 and right shift, a letter in the original message is replaced by the letter three places to the right. To decipher an encoded message, you find the coded letters in the alphabet, and replace them with letters 3 letters to the left. We can visualize this by juxtaposing the letters of the alphabet above an alphabet shifted three characters. Find the letter to encode in the upper list and replace it with the character in the lower list. To decode, find coded letters in the lower list and replace with top letter. ABCDEFGHUKLMNOPQRSTUVWxYZ DEFGHUKLMNOPORSTUVWXYZABC Assignment Write a program that will encode and decode messag your class caesarcipher es using the Caesar cipher with a right shift. Name The program will: 1. Prompt for the key; a number between 1 and 25. 2. Prompt for E for encrypt or D for Decrypt. 3. Prompt for the message to encode/decode. 4. Encode or decode the message. Remove all spaces before encoding. 5. Print the encoded or decoded message. 6. Prompt for q to quit or Enter to encode/decode another message. 7. The program should keep looping to encode/decode messages until Q is entered
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
