Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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
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