simple-calculator

Tech

Build

./mvnw -B package --file pom.xml

Run Jar

java -cp target/simple-calc-1.0-SNAPSHOT.jar org.example.Main

Usage

Valid Sample for Addition of Integers

Welcome to the simple calculator
Please enter first number:
9
Please enter second number:
5
Please enter operation:
+
The result of this simple calculation is: 14.0

Valid Sample for Subtraction

Welcome to the simple calculator
Please enter first number:
9
Please enter second number:
5
Please enter operation:
-
The result of this simple calculation is: 4.0

Valid Sample for Multiplication

Welcome to the simple calculator
Please enter first number:
9
Please enter second number:
5
Please enter operation:
*
The result of this simple calculation is: 45.0

Valid Sample for Division

Welcome to the simple calculator
Please enter first number:
9
Please enter second number:
3
Please enter operation:
/
The result of this simple calculation is: 3.0

Valid Sample for Addition of Doubles

Welcome to the simple calculator
Please enter first number:
5.5
Please enter second number:
7.7
Please enter operation:
+
The result of this simple calculation is: 13.2

Unsupported Operation Sample (Enter numbers/operation as prompted in console)

Welcome to the simple calculator
Please enter first number:
1
Please enter second number:
3
Please enter operation:
]
Exception in thread "main" java.lang.UnsupportedOperationException: The operation entered is unsupported, please use (+|-|*|/) instead of: ]
at org.example.Main.main(Main.java:28)

Build & Runs Views from IDE

idea-intellij-view