* Takes a list of strings representing either operators or operands and returns
* the result of a reverse-polish notation calculation on them
* Sample output:
* {"4", "1", "+", "2", "*"} -> ((4 + 1) * 2) -> 10
* {"5", "8", "4", "/", "+"} -> (5 + (8 / 4)) -> 7
* Supported operators are +, -, *, and /
* @param ops the series of operators and operands to operate on
* @return a Double equal to the result of the calculation
* @throws IllegalArgumentException if ops does not represent a well-formed RPN expression
* @throws ArithmeticException if the expression generates an arithmetic error, such as dividing by zero
*/