Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please help. Thank you! This is java programming(BlueJ) CM-111 Spring 2018 Assignment 6: The Cesar Cipher Due 3/8/2018 Background Jullus Caesar is credited with using
Please help. Thank you! This is java programming(BlueJ)
CM-111 Spring 2018 Assignment 6: The Cesar Cipher Due 3/8/2018 Background Jullus 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: ATTACK THE ENEMY Encoded message: 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 messages your class caesarcipher 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 enteredStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started