Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write m e all the T O D O TASKS: #include #include #include #include #include using namespace std; const string ALPHABET = ABCDEFGHIJKLMNOPQRSTUVWXYZ; /
Please write all the TASKS: #include
#include
#include
#include
#include
using namespace std;
const string ALPHABET "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Function prototypes at the top of the file for function decomposition
Print instructions for using the program.
void printMenu;
Returns the based index in the English alphabet where c appears,
or if c is not an uppercase letter in the alphabet.
For example:
findIndexInAlphabetA returns
findIndexInAlphabetD returns
findIndexInAlphabet returns
findIndexInAlphabeta returns
int findIndexInAlphabetchar c;
Returns c rotated by amount many characters forward. If we run out
of letters in the alphabet, wrap around back to A This method
assumes that c is an uppercase letter.
For example:
rotA returns A
rotA returns B
rotZ returns A
rotA returns K
rotJ returns I
char rotchar c int amount;
Returns a new string in which every character has been rotated by amount
letters. Lowercase letters are converted to uppercase and rotated.
Nonalphabetic characters are left alone.
For example:
rotA returns A
rotAA returns DD
rotHELLO returns "HELLO"
rotHELLO returns "IFMMP"
rotoh HELLO returns PI IFMMP
string rotstring line, int amount;
int main
string command;
cout "Welcome to Ciphers!" endl;
cout endl;
cout endl;
do
printMenu;
cout endl
"Enter a command case does not matter: ;
Use getline for all user input to avoid needing to handle
input buffer issues relating to using both and getline
getlinecin command;
cout endl;
TODOSTUDENT: Execute nonexit commands
cout endl;
while command x command X;
return ;
void printMenu
cout "Ciphers Menu" endl;
cout endl;
Caesar Ciphers
cout C Encrypt with Caesar Cipher" endl;
cout D Decrypt Caesar Cipher" endl;
Vigenere
cout V Encrypt with Vigenre endl;
Utility
cout X Exit Program" endl;
int findIndexInAlphabetchar c
TODOSTUDENT
return ;
char rotchar c int amount
TODOSTUDENT
return c;
string rotstring line, int amount
TODOSTUDENT
return line;
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