#ifndef MDM_MONOALPHABETIC_SUBSTITUTION
#define MDM_MONOALPHABETIC_SUBSTITUTION

#include <string>
#define MDM_ALPHABET_SIZE 26
#define MDM_UNKNOWN -1

class MonoAlphabeticSubstitution {

private:
	char decode[MDM_ALPHABET_SIZE];
public:

	// initialize the decode array
	MonoAlphabeticSubstitution();

	// Computer and display a frequency table on the given string
	bool frequencyAnalysis(string encrypted);

	// Define a new substitution.
	char defineSubstitution(char encrypt, char plain);
	bool defineAllSubstitutions(string plaintext);
	bool defineAllSubstitutions(string encrypted, string plaintext);
	bool defineAllSubstitutions(int m, int b);
	// Undefine an existing substitution
	char undefineSubstitution(char encrypt);
	void undefineAllSubstitutions();
	// Display all defined substitutions
	bool displaySubstitutions();

	// Uses the current cipher to attempt a decode
	string decodeString(string encrypted);

};

#endif