Implemented methods to evaluate the nodes in the expression tree