class Calculator
{
private:
	double m_op1,m_op2;
	char m_muvjel;
	double m_eredm;
public:
	double GetOp1();
	double GetOp2();
	char GetMuvJel();
	double GetEredm();
	void Init(double op1, double op2,
			  char muvjel);
	double Szamol();
};

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

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

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

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

void Calculator::Init(double op1, double op2,
			  char muvjel)
{
	m_op1 = op1;
	m_op2 = op2;
	m_muvjel = muvjel;
	m_eredm = 0;
}

double Calculator::Szamol()
{
	switch (m_muvjel)
	{
	case '+':
		  m_eredm = m_op1 + m_op2;
		  break;
	case '-':
		  m_eredm = m_op1 - m_op2;
		  break;
	case '*':
		  m_eredm = m_op1 * m_op2;
		  break;
	case '/':
		  m_eredm = m_op1 / m_op2;
		  break;
	}
	return m_eredm;
}
