class Calculator
{
private:
	double m_dOp1;
	double m_dOp2;
	char m_cMuvJel;
	double m_dEredm;
public:
	Calculator();
	Calculator(double dOp1, double dOp2, 
		      char cMuvJel);
	void Init(double dOp1, double dOp2, 
		      char cMuvJel);
	double GetOp1();
	double GetOp2();
	char GetMuvJel();
	void SetOp1(double dOp1);
	void SetOp2(double dOp2);
	void SetMuvJel(char cMuvJel);
	double GetEredm();
	double Szamol();
};

Calculator::Calculator()
{
	m_dOp1=0;
	m_dOp2=0;
	m_cMuvJel=' ';
	m_dEredm=0;
}

Calculator::Calculator(double dOp1, 
					   double dOp2, 
					   char cMuvJel)
{
	Init(dOp1,dOp2,cMuvJel);
}

void Calculator::Init(double dOp1, 
					  double dOp2, 
					  char cMuvJel)
{
	m_dOp1=dOp1;
	m_dOp2=dOp2;
	m_cMuvJel=cMuvJel;
	m_dEredm=Szamol();
}

double Calculator::GetOp1()
{
	return m_dOp1;
}

double Calculator::GetOp2()
{
	return m_dOp2;
}

char Calculator::GetMuvJel()
{
	return m_cMuvJel;
}

void Calculator::SetOp1(double dOp1)
{
	m_dOp1 = dOp1;
}
void Calculator::SetOp2(double dOp2)
{
	m_dOp2 = dOp2;
}

void Calculator::SetMuvJel(char cMuvJel)
{
	m_cMuvJel = cMuvJel;
}

double Calculator::GetEredm()
{
	return m_dEredm;
}

double Calculator::Szamol()
{
	switch(m_cMuvJel)
	{
	case '+': 
		m_dEredm = m_dOp1 + m_dOp2;
		break;
	case '-': 
		m_dEredm = m_dOp1 - m_dOp2;
		break;
	case '*': 
		m_dEredm = m_dOp1 * m_dOp2;
		break;
	case '/': 
		m_dEredm = m_dOp1 / m_dOp2;
		break;
	}
	return m_dEredm;
}
