I am trying to make a simulation of the enigma machine and was wondering if this is the right way to start the problem?
Here's the main.cpp file:
#include <iostream>
#include <ctime>
#include <cmath>
#include "enigma.h"
using namespace std;
int main ()
{
enigma machine_1;
return 0;
}
Here's the enigma.h file:
#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <cmath>
using namespace std;
class plug_board
{
private:
public:
plug_board()
{
cout << "new plug_board" << endl;
}
~plug_board()
{
cout << "plug_board gone" << endl;
}
};
class reflector
{
private:
public:
reflector()
{
cout << "new reflector" << endl;
}
~reflector()
{
cout << "reflector gone" << endl;
}
};
class rotor
{
private:
public:
rotor()
{
cout << "new rotor" << endl;
}
~rotor()
{
cout << "rotor gone" << endl;
}
};
class enigma
{
private:
public:
enigma()
{
cout << "new enigma" << endl;
plug_board board_1;
reflector reflect_1;
rotor roto_1;
rotor roto_2;
rotor roto_3;
}
~enigma()
{
cout << "enigma gone" << endl;
}
};
Any help or suggestions will be greatly appreciated.