I have problem in java Assignment

Posted by Nuwan under Others on 5/11/2012 | Points: 10 | Views : 883 | Status : [Member] | Replies : 0
Dear All,

My Friend give me a Assignment in Java. Im not expert in java,
Please help me do this Assignment.

Task 02(Implement a stack calculator)

1.Develop and Implements a stack calculator that does arithmetic with
doubles.
It accepts commands in any of the following formats.
2.Push double-value, add, sub, mult, div, clear, quit

3.The calculator itself should be implemented as a separate class named
stack
calculator. This class should have the following methods.

. Push X onto the stack
. Pops the top value from the stack
. Pops two values off the stack, adds them, and pushes the result back
onto the stack.
. Pops two values off the stack, substracts them and pushes the result
back onto stack.
. Pops two values off the stack, multiplies them and pushes the result
back onto the stack
. Pops two values off the stack, divides the first value into the second
one and pushes the result back onto the stack
. Removes all entries from the stack
. Returns all of the values from the stack in array, without removing them

from the stack.Gets the number of values in the stack

4. The Stack calculator class should use arrays to maintain the stack data.
5. Justify the reason for using stack for this application

Rathnayake


Responses

(No response found.)

Login to post response