Write a program that receives a coded message file(Lab3ExtraCreditCT.txt) from your local espionage agent and decodes it into a file using standard English. The problem is your agent forgot to tell you the key used to decode the message. Fortunately, this is a simple substitution code consistently using 1 alphanumeric character to represent another, this is case sensitive. All other characters are not substituted, so a space will always be a space, a – will always be a –, a @ will always be a @, etcetera.  You may use the following table to help you, it contains the most common letters used in the English language in descending order. E A R I O T N S L C U D P M H G B F Y W K V X Z J Q 0 5 3 2 4 6 8 1 9 7   Using the following key to convert plaintext to coded text:                 Plaintext   = Now is the time for all good men to come to the aid of their country. Key = THEQUICKBROWNFXJMPSVLAZYDG The file your program outputs should look like this: Coded Text = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd. Vice versa, using coded text with the same key reverses the message back to plaintext. Plaintext   = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd. Key = THEQUICKBROWNFXJMPSVLAZYDG The file your program outputs should look like this: Coded Text = Now is the time for all good men to come to the aid of their country. ----- Please show exactly how it is with images attached!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Write a program that receives a coded message file(Lab3ExtraCreditCT.txt) from your local espionage agent and decodes it into a file using standard English. The problem is your agent forgot to tell you the key used to decode the message. Fortunately, this is a simple substitution code consistently using 1 alphanumeric character to represent another, this is case sensitive. All other characters are not substituted, so a space will always be a space, a – will always be a –, a @ will always be a @, etcetera.  You may use the following table to help you, it contains the most common letters used in the English language in descending order.

E A R I O T N S L C U D P M H G B F Y W K V X Z J Q 0 5 3 2 4 6 8 1 9 7

 

Using the following key to convert plaintext to coded text:
                Plaintext   = Now is the time for all good men to come to the aid of their country.

Key = THEQUICKBROWNFXJMPSVLAZYDG

The file your program outputs should look like this:

Coded Text = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.

Vice versa, using coded text with the same key reverses the message back to plaintext.

Plaintext   = Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.

Key = THEQUICKBROWNFXJMPSVLAZYDG

The file your program outputs should look like this:

Coded Text = Now is the time for all good men to come to the aid of their country.

-----

Please show exactly how it is with images attached!

Encoding run
Enter the name of the input file or enter
"Lab3ExtraCreditPT.txt":'~
to use
Enter the name of the Key file or enter "~" to use
"Lab3ExtraCreditKEY.txt": -
Enter the name of the output file or enter "~" to use
"Lab3ExtraCreditCT.txt": -
Enter "E" to Encode the output from the input, or
enter "D" to _Decode the input to the output: E
Encrypting file.
Successfully read and translated 9231 characters.
Press any key to Exit.
11 | Page
Lab 3 Assignment
Decoding run
Enter the name of the input file or enter "~" to use
"Lab3ExtracreditPT.txt": Lab3ExtraCreditCT.txt
Enter the name of the Key file or enter "~" to use
"Lab3ExtracreditKEY.txt": ~
Enter the name of the output file or enter "~" to use
"Lab3ExtracreditCT.txt": Lab3ExtraCreditPT.txt
Enter "E" to Encode the output from the input, or
enter "D" to Decode the input to the output: d
Decrypting file.
Successfully read and translated 69 characters.
Press any key to Exit.
Transcribed Image Text:Encoding run Enter the name of the input file or enter "Lab3ExtraCreditPT.txt":'~ to use Enter the name of the Key file or enter "~" to use "Lab3ExtraCreditKEY.txt": - Enter the name of the output file or enter "~" to use "Lab3ExtraCreditCT.txt": - Enter "E" to Encode the output from the input, or enter "D" to _Decode the input to the output: E Encrypting file. Successfully read and translated 9231 characters. Press any key to Exit. 11 | Page Lab 3 Assignment Decoding run Enter the name of the input file or enter "~" to use "Lab3ExtracreditPT.txt": Lab3ExtraCreditCT.txt Enter the name of the Key file or enter "~" to use "Lab3ExtracreditKEY.txt": ~ Enter the name of the output file or enter "~" to use "Lab3ExtracreditCT.txt": Lab3ExtraCreditPT.txt Enter "E" to Encode the output from the input, or enter "D" to Decode the input to the output: d Decrypting file. Successfully read and translated 69 characters. Press any key to Exit.
Sample Test Files
| Lab3ExtraCreditPT.bxt - Notepad
File Edit Format View Help
Now is the time for all good men to come to the aid of their country.
| Lab3ExtraCreditKEY.bxt - Notepad
O X
File Edit Format View Help
THEQUICKBROWNFXJMPSVLAZYDGthequickbrownfxjmpsvlazydg9876543210
Lab3ExtraCreditCT.txt - Notepad
File Edit Format View Help
Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.
Transcribed Image Text:Sample Test Files | Lab3ExtraCreditPT.bxt - Notepad File Edit Format View Help Now is the time for all good men to come to the aid of their country. | Lab3ExtraCreditKEY.bxt - Notepad O X File Edit Format View Help THEQUICKBROWNFXJMPSVLAZYDGthequickbrownfxjmpsvlazydg9876543210 Lab3ExtraCreditCT.txt - Notepad File Edit Format View Help Fxz bs vku vbnu ixp tww cxxq nuf vx exnu vx vku tbq xi vkubp exlfvpd.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education