Hello, C++ programming The source code starter file is included as an attachment The file starts with this string as the input to your encryption algorithm LLSNEEIRUIGNUL-CHXUADUPUGD-RTYI61IE-GDD5E0-607325-8576A598DFJ-EH8IKD7E037FJKE87--54625B6870-FJE941597---FHE7FHJ8KEN436-471369073C8767DFE-7KO8FLKE6895-8934 When properly decoded, the answer will describe how might you feel after you get this encyption scheme working Here is a list of steps needed to unencrypt your passcode, which is also found in the source code file: Create an empty stack The first 15 characters of the string get pushed into the stack in order (LLSNEEIRUIGNUL-) Create an empty queue The next 16 characters of the string get pushed into the queue in order (CHXUADUPUGD-RTYI) Create an empty deque For the remaining characters of the string in order (61IE-GDD5E0-607325-8576A598DFJ...) do the following conditionally: 1 = Pop the stack 2 = Pop the queue 3 = Pop the front of the deque 4 = Pop the back of the deque 5 = Move the top element of the stack to the back of queue 6 = Move the front element of the queue to the top of stack 7 = Move the top element of the stack to the front of deque 8 = Move the front element of the queue to the front of deque Anything else - Do nothing and move on NOTE: The term MOVE is not the same thing as COPY The deque will now have the secret phrase in it, listed from front to back, so print it out

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter18: Stacks And Queues
Section: Chapter Questions
Problem 3PE
icon
Related questions
Question

Hello, C++ programming

The source code starter file is included as an attachment

The file starts with this string as the input to your encryption algorithm
LLSNEEIRUIGNUL-CHXUADUPUGD-RTYI61IE-GDD5E0-607325-8576A598DFJ-EH8IKD7E037FJKE87--54625B6870-FJE941597---FHE7FHJ8KEN436-471369073C8767DFE-7KO8FLKE6895-8934
When properly decoded, the answer will describe how might you feel after you get this encyption scheme working

Here is a list of steps needed to unencrypt your passcode, which is also found in the source code file:

  • Create an empty stack
  • The first 15 characters of the string get pushed into the stack in order (LLSNEEIRUIGNUL-)
  • Create an empty queue
  • The next 16 characters of the string get pushed into the queue in order (CHXUADUPUGD-RTYI)
  • Create an empty deque
  • For the remaining characters of the string in order (61IE-GDD5E0-607325-8576A598DFJ...) do the following conditionally:
    • 1 = Pop the stack
    • 2 = Pop the queue
    • 3 = Pop the front of the deque
    • 4 = Pop the back of the deque
    • 5 = Move the top element of the stack to the back of queue
    • 6 = Move the front element of the queue to the top of stack
    • 7 = Move the top element of the stack to the front of deque
    • 8 = Move the front element of the queue to the front of deque
    • Anything else - Do nothing and move on
    • NOTE:  The term MOVE is not the same thing as COPY
  • The deque will now have the secret phrase in it, listed from front to back, so print it out

 

 

#include <iostream>
#include <deque>
#include <queue>
#include <stack>
#include <string>
int main()
{
}
// Here is your input
std::string passcode
// Create an empty stack
// The first 15 characters of the string get pushed into the stack in order
// Create an empty queue
// The next 16 characters of the string get pushed into the queue in order
// Create an empty deque
=
string
"LLSNEEIRUIGNUL-CHXUADUPUGD-RTY161IE-GDD5E0-607325-8576A598DFJ-EH8IKD7E037FJKE87--54625B6870-FJE941597---FHE7FHJ8KEN436-471369073C8767DFE-7KO8FLKE6895-8934";
// For the remaining characters of the string in order:
// 1
Pop the stack
// 2
Pop the queue
// 3
Pop the front of the deque
// 4 -
Pop the back of the deque
// 5 -
Move the top element of the stack to the back of queue
// 6 -
Move the front element of the queue to the top of stack
// 7 - Move the top element of the stack to the front of deque
// 8 - Move the front element of the queue to the front of deque
// Anything else - Do nothing and move on
std::cout << "How might you feel when you get this encryption scheme working properly?" << std::endl;
// The deque will have the secret phrase in it, listed from front to back, so print it out
// Cleanup
system("PAUSE");
return 0;
Transcribed Image Text:#include <iostream> #include <deque> #include <queue> #include <stack> #include <string> int main() { } // Here is your input std::string passcode // Create an empty stack // The first 15 characters of the string get pushed into the stack in order // Create an empty queue // The next 16 characters of the string get pushed into the queue in order // Create an empty deque = string "LLSNEEIRUIGNUL-CHXUADUPUGD-RTY161IE-GDD5E0-607325-8576A598DFJ-EH8IKD7E037FJKE87--54625B6870-FJE941597---FHE7FHJ8KEN436-471369073C8767DFE-7KO8FLKE6895-8934"; // For the remaining characters of the string in order: // 1 Pop the stack // 2 Pop the queue // 3 Pop the front of the deque // 4 - Pop the back of the deque // 5 - Move the top element of the stack to the back of queue // 6 - Move the front element of the queue to the top of stack // 7 - Move the top element of the stack to the front of deque // 8 - Move the front element of the queue to the front of deque // Anything else - Do nothing and move on std::cout << "How might you feel when you get this encryption scheme working properly?" << std::endl; // The deque will have the secret phrase in it, listed from front to back, so print it out // Cleanup system("PAUSE"); return 0;
Expert Solution
steps

Step by step

Solved in 3 steps with 6 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning