Created Morse Code encoder/decoder

This commit is contained in:
2018-05-01 23:34:59 -04:00
parent 7210f5849e
commit 50a12f7a18
2 changed files with 173 additions and 0 deletions

34
Headers/Morse.hpp Normal file
View File

@@ -0,0 +1,34 @@
//Ciphers/Headers/Morse.hpp
//Matthew Ellison
// Created: 5-1-18
//Modified: 5-1-18
//This file contains the declaration of the Morse class
//This class is designed to translate Morse Code into regular letters and numbers
#ifndef MORSE_HPP
#define MORSE_HPP
#include <string>
#include <sstream>
class Morse{
private:
static std::string code[];
std::stringstream inputString;
std::string outputString;
std::string encode();
std::string decode();
public:
Morse();
~Morse();
void setEncodeInputString(std::string input);
void setDecodeInputString(std::string input);
std::string getInputString() const;
std::string getOutputString() const;
std::string encode(std::string input);
std::string decode(std::string input);
void reset();
};
#endif //MORSE_HPP