/*****************************************
 * Instructions
 *  - Replace 'uwuserid' with your uWaterloo User ID
 *  - Select the current calendar term and enter the year
 *  - List students with whom you had discussions and who helped you
 *
 * uWaterloo User ID:  uwuserid @uwaterloo.ca
 * Submitted for ECE 250
 * Department of Electrical and Computer Engineering
 * University of Waterloo
 * Calender Term of Submission:  (Winter|Spring|Fall) 201N
 *
 * By submitting this file, I affirm that
 * I am the author of all modifications to
 * the provided code.
 *
 * The following is a list of uWaterloo User IDs of those students
 * I had discussions with in preparing this project:
 *    -
 *
 * The following is a list of uWaterloo User IDs of those students
 * who helped me with this project (describe their help; e.g., debugging):
 *    -
 *****************************************/

#ifndef EXPRESSION_TREE_H
#define EXPRESSION_TREE_H

#ifndef nullptr
#define nullptr 0
#endif

#include "ece250.h"

#include <iostream>
using namespace std;

class ExpressionTree {
	private:
		int value;
		ExpressionTree *left_tree;
		ExpressionTree *right_tree;

	public:
		ExpressionTree( int = 0, ExpressionTree * = 0, ExpressionTree * = 0 );

		~ExpressionTree();

		static const int PLUS = 0;
		static const int MINUS = 1;
		static const int TIMES = 2;
		static const int DIVIDE = 3;

		// Accessors

		bool is_leaf() const;
		int evaluate() const;
		void in_fix( int, bool ) const;
		void reverse_polish() const;
};

#endif