Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Mission #9 CS 1400- Hilton Write a program that allows users to encrypt and decrypt files. The file encryption technique we will use for this

image text in transcribed

Mission #9 CS 1400- Hilton Write a program that allows users to encrypt and decrypt files. The file encryption technique we will use for this program is the highly secure one letter off, system. So an a" will be represented by a "b", and a "b" will be represented by a "c" in the encrypted file. Encrypt only the letters in the file. If you come to a non-letter character (spaces, punctuation, numbers, etc.), just print them as is without encrypting. Prompt the user for the file name. Then prompt the user as to whether they would like to encrypt or decrypt the file, and perform the encryption or decryption. Output the file to a new file named "Encrypted.txt" if the user chooses to Encrypt, or "Decrypted.txt" if the user chooses to Decrypt. HINT: A char" is a character from the ASCII Table. Because the ASCII Table is just an ordered set of characters, we can use the +or - -to move forward and backward in the ASCII just like we do to increment or decrement an integer. The decrypted file should look exactly the same as the original file if we have done things correctly, even if the original file has multiple lines of text. Also, keep in mind that these assignments build on each other, so we'll be using a number of the prebuilt methods we previously learned about in this assignment. Sample Session: Please enter the name of the file: test.txt Would you 1ike to encrypt or decrypt?: encrypt File has been encrypted to Encrypted.txt Please enter the name of the file: Encrypted.txt Would you like to encrypt or decrypt?: decrypt File has been decrypted to Decrypted.txt Submit your java file via WSU Online

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

a sin(2x) x Let f(x)=2x+1 In(be)

Answered: 1 week ago

Question

3. What should a contract of employment contain?

Answered: 1 week ago

Question

1. What does the term employment relationship mean?

Answered: 1 week ago