Question: Write a Java program for a simple calculator that supports addition / subtraction / multiplication / division / power. You can assume that each token
Write a Java program for a simple calculator that supports addition / subtraction / multiplication / division / power. You can assume that each token (operands and operators) are separated by whitespaces (can be multiple whitespaces). The program should gracefully exit after the user types a single . on a separate line.
Sample output (input in bold):
3 + 5 8 3 - 5 -2 3 * 5 15 3 / 5 0.6 3 ^ 2 9 .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
