Package com.marakana.calculator.expressions

Examples of com.marakana.calculator.expressions.Expression


    default:
      return false;
    }

    // pop two numbers off the stack and push the result
    Expression rhs = stack.pop(), lhs = stack.pop();
    stack.push(new OperationExpression(operator, lhs, rhs));
    return true;
  }
View Full Code Here


    // get the command-line argument from the array
    String expression = args[0];

    // print the result of calculate
    Expression tree = parse(expression);

    int result = tree.getValue();
    System.out.println(result);
  }
View Full Code Here

TOP

Related Classes of com.marakana.calculator.expressions.Expression

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.