Website Summary Files Commits Branches @commit @diff @stats
path: root / Polymorphism / MathExpression / Expression.hpp
blob: 4f09790d776c25f08fd8a953489ab0917d81c601 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <iostream>

class Expression
{
public:
	virtual void Print() = 0;
	virtual int Evaluate() = 0;
	virtual ~Expression(){}
	int getType(){ return type; }
protected:
	int type; //Ако обектът е NUM, ще пазим тук 1, а ако обектът е Операция, ще пазим тук 2.
};