Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python Exercises 1: For this question, only consider the usual alphabet composed of characters in LA-Z]. You can assume that all the input values will
python
Exercises 1: For this question, only consider the usual" alphabet composed of characters in LA-Z]. You can assume that all the input values will be valid. Implement a SimpleCipher class that has at least a data member called private_key a proper constructor a method called encrypt which take a message and returns the encrypted message according to the following algorithm Each letter in the original string is replaced by a lettern position 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 ABCDEFGH XYZA Implement a DoubleCipher class that is a specialization of the SimpleCipher with: an additional data member called second_private_key a proper constructor a method called double_encrypt which take a message and returns the encrypted message according to the following algorithm o first encrypt the message as in SimpleCipher. let us call the result temp o then encrypt each letter in temp as the character resulting from xoring the ASCII code of that character with second_private_key. The result of this step is the encrypted message Write a main function that prompts the user to enter a message prompts the user to select an encryption schema: SimpleCipher or DoubleCipher then prompts the user to the necessary key(s) create a proper object(SimpleCipher or DoubleCipher) display the encrypted message Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started