public class SquareRoot extends PostfixMathCommand
curNumberOfParameters, numberOfParameters| Constructor and Description |
|---|
SquareRoot() |
| Modifier and Type | Method and Description |
|---|---|
void |
run(Stack inStack)
Applies the function to the parameters on the stack.
|
Object |
sqrt(Object param)
Calculates the square root of the parameter.
|
checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParameterspublic void run(Stack inStack) throws ParseException
run in interface PostfixMathCommandIrun in class PostfixMathCommandParseExceptionpublic Object sqrt(Object param) throws ParseException
ParseExceptionCopyright © 2018. All rights reserved.