Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I need help ASAP, I am only allowed to use for loops and a detailed guide would be nice! Worksheet #3: The Caesar Cipher CSC
I need help ASAP, I am only allowed to use for loops and a detailed guide would be nice!
Worksheet #3: The Caesar Cipher CSC 142 Computer Programming I Due Wednesday 1/25/2017 Background BCE, was a Roman general and politician. Julius Caesar, who lived from 100 BCE to 44 who played a key role in the downfall of the Roman Republic and the rise of the Roman Empire. As a politician, he was the champion of lower class citizens and the working man. As a general, he was dominant, and is considered one of the greatest military commanders in history. After conquering territory, Caesar returned to Rome and used his army and his popularity to instigate a civil war and take He was eventually assassinated by a group of Roman and his assassination led to a power vacuum that transformed Rome from a republic to an empire. Caesar's military and political activities meant secret codes and ciphers were important for him. However, ciphers A B and codes were uncommon and encoding methods were primitive. Caesar encoded messages by shifting e letter forward or backward a certain number of spaces, and the private or secret key was how many letters to shift. For NAAQ example, if the key were 3, Awould become D, B would become E, C would become F, and so on Imagine two disks, with each letter of the alphabet printed in order on the outside of the disk, with a smaller di sk laid on top of a larger disk. By lining up the letters on the two rings then shifting one disk forward by a certain number of places the Caesar shift cipher is easy to apply. You will be performing this shift using software Assignment You will be implementing a Caesar cipher in Java. You will do this by implementing two methods -one method to encrypt (turn a plain text into a cipher text and one to decrypt (turn a cipher text into a plain text). These methods will need to take a parameter that is the private key The principal operation to implement the Caesar cipher is shifting each character by a certain amount. The same operation will work for both encryption and decryption. Hint: explore the char primitive data type and the Character wrapper class. Questions You will use your program to encrypt 3 plain texts and to decrypt 3 cipher texts To encrypt a plain text, you take each letter, and shift it forward a certain number of letters. That number is your secret key. You will be given the secret key and asked to encrypt the message using that key To decrypt a cipher text, you take each letter, and shift it backward a certain number of letters. That number is the secret key. You will not know the secret key. Think about how you can guess the correct key
Step 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