|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--RPNCalc
Constructor Summary | |
RPNCalc()
Constructs a new RPN calculator ojbect. |
Method Summary | |
void |
add()
Pops two numbers off of the RPN calculator's stack; Adds the two numbers together, and places the result on the stack. |
void |
divide()
Pops two numbers off of the RPN calculator's stack; Divides the second number popped off of the stack by the first, and places the result on the stack. |
void |
multiply()
Pops tow numbers off of the RPN calculator's stack; Multiplies the two numbers and places the result on the stack. |
void |
number(float item)
Places the given number on the calculator's stack |
void |
subtract()
Pops two numbers off of the RPN calculator's stack; Subtracts the first number popped off of the stack from the second, and places the result on the stack. |
float |
top()
Returns the top item on the RPN calculator's stack, does not remove the number from the stack. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public RPNCalc()
Method Detail |
public void add()
public void divide()
public void multiply()
public void subtract()
public void number(float item)
item
- The number to be added to the stack.public float top()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |