Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING PYTHON Exercises 2: text For this question, only consider the usual alphabet composed of characters in [A-Z]. You can assume that all the input

image text in transcribed
USING PYTHON
Exercises 2: text For this question, only consider the "usual" alphabet composed of characters in [A-Z]. You can assume that all the input values will be valid. Implement a SimpleCipher class as a subclass of threading.Thread. The SimpleCipher has has at least a data member called private_key a proper constructor a method called ecrypt_file that takes as argument the file name to be encrypted and the name of the output file (where to store the encrypted text) The method opens the first file, and encrypted the according to the following algorithm o Each letter in the original file is replaced by a letter n positions to the right down the alphabet (if you reach the Z continue from the A); for example, if n is 2, then the letter B is replaced by D, and the letter Y is replaced by A, and so on. n is the private_key. Character not in the range (A-Z] are not encrypted o Write a multithreaded program that attempts to encrypt the contents of 10 different files concurrently using the SimpleCipher class defined in the previous step. You need to create one thread of execution to process each file. Your program asks the user to input the names of the text files to be encrypted

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_2

Step: 3

blur-text-image_3

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

Lab Manual For Database Development

Authors: Rachelle Reese

1st Custom Edition

1256741736, 978-1256741732

More Books

Students also viewed these Databases questions

Question

To find integral of sin(logx) .

Answered: 1 week ago

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago