Computer Science Homework Help

Computer Science Encrypted Message Decoding

 

I have provided the instructions in the attachments.

Also here is the code that was on cpp file since It did not allow me to upload a cpp file#include <iostream>

#include <fstream>

#include <string>

#include “CypherA.h”

#include “CypherB.h”

using namespace std;

int main(int argc, const char * argv[]) {

string filename;

char option;

cout << “Enter file name to be decoded with algorithm A: “;

cin >> filename;

CypherA messageA (filename);

if (messageA.isEmpty())

{

cerr << “ERROR: Message could not be read.” << endl;

}

else

{

messageA.decode();

cout << “Decoded message: n”;

messageA.print();

cout << endl << endl;;

}

cout << “Enter file name to be decoded with algorithm B: “;

cin >> filename;

CypherB messageB (filename);

if (messageB.isEmpty())

{

cerr << “ERROR: Message could not be read.” << endl;

}

else

{

messageB.decode();

cout << “Decoded message: n”;

messageB.print();

cout << endl;

}

return 0;

}