Question: Design a RandomCipher class as a subclass of the SubstitutionCipher from Exercise P-3.40, so that each instance of the class relies on a random permutation
Design a RandomCipher class as a subclass of the SubstitutionCipher from Exercise P-3.40, so that each instance of the class relies on a random permutation of letters for its mapping.
Exercise P-3.40
Implement a class, SubstitutionCipher, with a constructor that takes a string with the 26 uppercase letters in an arbitrary order and uses that as the encoder for a cipher (that is, A is mapped to the first character of the parameter, B is mapped to the second, and so on.) You should derive the decoding map from the forward version.
Step by Step Solution
3.32 Rating (161 Votes )
There are 3 Steps involved in it
The RandomCipher class is a subclass of the SubstitutionCipher class from Exercise P340 The RandomCi... View full answer
Get step-by-step solutions from verified subject matter experts
