Question
JAVA language Description: is about Caesar Cipher technique which is one of the earliest and simplest ciphers. It is simply a type of substitution cipher
JAVA language
Description: is about Caesar Cipher technique which is one of the earliest and simplest ciphers. It is simply a type of substitution cipher where each letter of a given text is replaced by a letter some fixed number of positions down the alphabet set {A, B, C Z}. For example, with a shift of 1, A would be replaced by B, B would become C, and so on. Thus, to encrypt a given text, we need an integer value known as key which indicates the number of positions each letter of the text has to be moved down. Phase 1: you will implement encryption operation of Caesar Cipher which will transform a given plaintext into ciphertext. You have to create a Java program containing a class called CaeserCipher to encrypt the plaintext into ciphertext.: The class must have two instance variables: message (plaintext) and key. The class must have a default constructor to initialize the instance variables with default values. The class must have a constructor that initializes the instance variables with specific values passed as parameters. The class must have a method called encrypt to compute the ciphertext from plaintext. In this phase the size of the plaintext is fixed to 5 letters The program will have a second class called CaesarCipherDemo that contains a main method to perform the following: Ask the user to input the plaintext (5letters) and key. Instantiate the object of CaesarCipher class by using the plaintext and key information. Compute and display the ciphertext. IV. Hint The code below can help you to code the method encrypt. String myString = "abcd"; //save the first character of the variable myString in the variable myChar char myChar =myString.charAt(0); //save the next character of myChar into the varaible newChar char newChar = (char)(myChar+1); 1. Brief description Provide a brief description of your program in this section.
2. Program code Put the code of your program in this section. Do not forget to document (comment) on your code.
3. Screenshots Put the different screenshots with a brief description in this section (at least 3 screenshots).
4. Difficulties Faced Provide a brief account of difficulties and challenges faced during this phase of the project.
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