You have been tasked to write a C# application that will go through the first step of encrypting an input file and writing the encrypted contents to an output file.

For this first step in encryption, read each letter in from the input file, add 3 letters to the value of the input letter. If the input letter is an A then the encrypted letter would be D. If the input letter is an X then the encrypted letter would be an A.

All spaces, digits, punctuation, and special characters do not need to be encrypted at this level. Simply write the space, punctuation, or special character to the output file as is.

If a letter is uppercase in the input file, it should remain as an uppercase character in the output file. If a letter is lowercase in the input file, it should remain as a lowercase character in the output file.

Since this program runs each month, the input file will be of various lengths; therefore, the program will read until end of file.

The input file is found in the current directory and is named October20.txt. The output file will be written to the current directory and named EncryptOct20.txt

An example:

If the contents of the input file is

Live long and prosper.

The output file would be:

Olyh orqj dqg survshu.

What the user should see when the program executes:

  • When the program begins, the statement "Encryption Level 1" should be displayed.
  • The focus should be set to the "Begin Encryption" button.
  • When the user clicks the "Begin Encryption" button, the program opens the input file, the statement "Opening input file...." should be displayed. The "Begin Encryption" button should be disabled.
  • When the program begins reading through the input file encrypting the contents, the statement "Encrypting input file...." should be displayed.
  • When the program closes the input and output files, the statement "Encryption complete...." should be displayed.
  • When the program is complete, the statement "End of process" should be displayed.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.