Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Language: Java Problem Description: Suppose an encrypted file was created using

ID: 3555603 • Letter: L

Question

Language: Java

Problem Description:

Suppose an encrypted file was created using the encoding/decoding scheme . Each letter is substituted by some other letter according to a given mapping as shown below.

String letters = "abcdefghijklmnopqrstuvwxyz";

String enc = "kngcadsxbvfhjtiumylzqropwe";

For example, every 'a' becomes a 'k' when encoding a text, and every 'k' becomes an 'a' when decoding. You will write a program, encode or decode a File, and then encodes or decodes the File using the mapping above. Capital letters are mapped the same way as the lower case letters above, but remain capitalized. For example, every 'A' becomes 'K' when encoding a file, and every 'K' becomes an 'A' when decoding. Numbers and other characters are not encoded and remain the same.

Write a program to read a file and encode the file to an encrypted file. And write a program to get an encrypted file and decode to original file. Your program should prompt the user to enter an input file name and an output file name

What should you do?

Explanation / Answer

TRY RUNNING THE PROGRAM AND RATE IF IT WORKS OR COMMENT IF ANY ERROR COMES