JAVA PLEASE 9.1 Lab 16: The Enigma Machine Introduction In this lab we develop a program for encrypting and decrypting t

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

JAVA PLEASE 9.1 Lab 16: The Enigma Machine Introduction In this lab we develop a program for encrypting and decrypting t

Post by answerhappygod »

JAVA PLEASE
9.1 Lab 16: The Enigma Machine
Introduction
In this lab we develop a program for encrypting and decrypting
text data. In other words, we are going to write messages in a
secret code! Watch this video to get started.
Encryption is the process of encoding messages or information in
such a way that only authorized parties can read it. Decryption is
the process of decoding encrypted data. The text before (and after)
encryption is called plaintext. The term for
encrypted data is ciphertext.
As an example, we may encode a plaintext message:
After which the ciphertext text will be:
Notice that the ciphertext looks nothing like the original.
However, looking more closely, we can see the encryption is really
the Unicode codes for the characters with a twist! We take each
pair of numbers, swap the digits, and then look up the code in
a Unicode table.
Encryption Algorithm
For each character in a String:
Encryption Example
Decryption Algorithm
For each pair of encrypted characters:
Decryption Example
Notice that with our two-digit conversion technique,
Unicode characters with codes higher than 99 ('c') will no longer
appear as numbers. For example:
Lab Specifications
Use the following prompt exactly:
Example Output
CODE TEMPLATE TO USE:
import java.util.Scanner;
public class Enigma {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
// Type your code here.
}

// Add your methods here.
}
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply