Question: Using java Secret Decoder Ring - Write a program that allows the user to encrypt or decrypt messages using two different types of encryption methods.

Using java

Using java Secret Decoder Ring - Write a program that allows theuser to encrypt or decrypt messages using two different types of encryption

Secret Decoder Ring - Write a program that allows the user to encrypt or decrypt messages using two different types of encryption methods. Ask the user whether they want to encrypt or decrypt a message, if they choose encrypt, prompt them to type in a message and to choose an encryption type, Atbash, or Caesar, if they choose Caesar, prompt them for a shift amount (1-25). Encrypt the message and write it to a file called message.txt' (leave any spaces or punctuation the same). If they choose to decrypt, prompt them to choose a decryption type, and a shift amount if they choose Caesar. Decrypt the message read in from the 'message.txt file and display it to the screen. Implement the following class structure for your program. The encrypt/decrypt methods in the Cipher class should loop through the message and call encryptLetter/decrypt Letter for each character in the string (hint: you can convert the message to all caps so you don't have to search upper and lower case letters). The encryptLetter/decryptLetter methods should call the getLetter method to get the letter in the cipherbet at the specified index. The constructors in the Caesar and Atbash Cipher classes should construct the cipherbet array based on the instructions below. Their getLetter methods should return the character in the array at the specified index. CaesarCipher char cipherbet CaesarCipher( ints)

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!