项目作者: anveshpmakey

项目描述 :
rpn-calculator-java
高级语言: Java
项目地址: git://github.com/anveshpmakey/rpn.git
创建时间: 2018-05-15T05:08:06Z
项目社区:https://github.com/anveshpmakey/rpn

开源协议:

下载


Java project to evalaute expressions using Reverse Polish Notation.

This project includes the following operations

Addition
Subtraction
Multiplication
Division
SQRT
POW

This project also includes undo operation - use the phrase “undo”

The phrase “clear” is used to clear the expression/operands fed to the stack

The phrase “exit” is used to quit the program execution

Build the the jar file using mvn install command.

Run the jar file using the command java -jar rpn-1.0-SNAPSHOT.jar

Example expressions

  1. -> 1 2 3 * 5 results in Stack: 1 6 5
  2. -> 4 sqrt results in Stack: 2
  3. -> 3 pow results in Stack: 9
  4. -> 1 2 3 4 5 undo results in 1 2 3 4
  5. -> 1 2 clear results in Stack: