Question: Understanding the problem: For this project each of you will create a Mealy machine (a finite state machine with output) to create the crypto-quotes found
Understanding the problem:
For this project each of you will create a Mealy machine (a finite state machine with output) to create the “crypto-quotes” found in the local newspaper. You can find a commercial example at the Arkansas Democrat Gazette, online (Links to an external site.). Here is an example generated by this program:
The cryptoquote text: ABA CU Q YQVCGWNBTS AMJ Q YQVCGWNBTS CU GBJ ABA.
Comes from the quotation: Bob is a palindrome but a palindrome is not Bob.
With the key value:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Q A Z W S X E D C R F V T G B Y H N U J M I K O L P
The program you create shall take the following as input:
- A sequence of 26 non-repeating alphabetic characters, representing the mapping to be used for substitution cypher
- A string containing the quote to be encrypted.
Note: Your program should leave non-alphabetic characters unchanged (space=space, ‘,’=’,’, etc.) and convert all alphabetic characters to uppercase.
Output shall be the crypto quote, ready to be solved.
Derive and implement a way to use your program to check a solved crypto-quote (your program does NOT have to solve crypto quotes). Modify your program to allow a user to perform either a crypto-quote check or a crypto-quote create using the same input sequence of 26 non-repeating characters.

NOTE: While the sample program accepts strings until a mapping for all 26 uppercase letters is provided, your program may require a unique permutation of the 26 letters to create a key. Just be sure you don't have any repeated letters in the key you create.
Hint: for mine I use two arrays, one is indexed by the original alphabet A, B, ...., Z, and stores the key (i.e., A->P) and the other is indexed by the key letters, A, B, ... , Z, and stores the original letter (i.e., if A->P in the first array, P-> A in the second). I then use one array to create cryptoquotes and the other to decode cryptoquotes using the same function.
C++
For this assignment you will write a program that will create a cryptoquote. It will do this by implementing a Mealy-machine. A Mealy machine is a finite state machine that produces an output as it transitions from one state to the next. Your machine will operate according to the following state diagram. It will convert all uppercase alphabetic characters to the appropriate key value (i.e., A-a1, B-a2, ..., Z-a26), remaining in state zero. For any printable non-alphabetic character your program will copy that character to the output (e.g, a space stays a space, a digit stays as a digit. etc.). Your machine will enter a final state when it gets an end-of-line (newline) character.
Step by Step Solution
3.38 Rating (154 Votes )
There are 3 Steps involved in it
key while True printPlease choose from the following options printt... View full answer
Get step-by-step solutions from verified subject matter experts
