Website Summary Files Commits Branches @commit @diff @stats
path: root / Polymorphism / MathExpression / Num.hpp
blob: d2da4aee5c66b15be212f0296d075069a774bda2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "Expression.hpp"
class Num : public Expression
{
	int number;
public:
	Num(int number)
	{
		this->number = number;
		type = 1;
	}
	void Print()
	{
		std::cout << number;
	}
	int Evaluate()
	{
		return number;
	}
	

};