Answered step by step
Verified Expert Solution
Link Copied!

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
image text in transcribed
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

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

video llowing polynomial in standard form. -7x^(3)-1-(1)/(9)x

Answered: 1 week ago

Question

2. Develop a persuasive topic and thesis

Answered: 1 week ago

Question

1. Define the goals of persuasive speaking

Answered: 1 week ago