Hello bidders! This is a beginner Java class and we have just learned method cla

Hello bidders! This is a beginner Java class and we have just learned method class and instancing. We have not learned past that. This problem should not be too difficult.You are writing a program that encrypts or decrypts messages using a simple substitution cipher. Your program will use two constant strings. One will represent the code for encryption: going from the original message (called the plaintext) to the encrypted version of the message. The other will be “abcdefghijklmnopqrstuvwxyz” (the lowercase alphabet. Your program will ask the user whether they want to 1) encrypt a message, 2) decrypt a message, or 3) quit. If they choose encrypt or decrypt, you will then get the message from the user and change it to all lower case. Then you will print out the encrypted or decrypted message character by character, using the information in the code to be used for encryption or decryption. The String you will use for encryption is “csimuylangpwzfrxbvhdtejqko”. How the substitution code works: With a substitution encryption, we select a substitute letter for each letter. Our encryption String has the substitute for ‘a’ at the first index (0) and the substitute for ‘b’ at the next index (1) and so on up to the substitute for ‘z’ at the last index (25). So what we will do is to look at the letter we want to encrypt, determine the index that corresponds to that letter using our alphabet string (and indexOf()) and then get the character at that index from the encryption code. Decryption will be similar except that we will get the index of the letter in the encryption string and then get the character at that index from the alphabet string. We will only substitute letters. All other characters will get passed on as is. Sample Program Run (user input in bold): Welcome to the Normal Encrypter! You may: Encrypt a message
Decrypt a message
Quit
Enter choice (1, 2, or 3): 1 Enter the message: Hello, world! Your encrypted message is: auwwr, jrvwm! You may: Encrypt a message
Decrypt a message
Quit
Enter choice (1, 2, or 3): 2 Enter the message: Auwwr, jrvwm! Your decrypted message is: Hello, world! You may: Encrypt a message
Decrypt a message
Quit
Enter choice (1, 2, or 3): 3 Thank you for using the Normal Encrypter! Requirements: Name your program Cypher.java.Zip your .java file for submission to —
The program must follow the coding guidelines for the course.
The program should be well commented.

Reference no: EM132069492

GET HELP WITH YOUR PAPERS

WhatsApp
Hello! Need help with your assignments? We are here
Don`t copy text!