Question
Before attempting to assist, please make sure you read all items below - PREVIOUS RESPONDENTS HAVE BEEN WRONG. 1. This is a JSFiddle Assignment so
Before attempting to assist, please make sure you read all items below - PREVIOUS RESPONDENTS HAVE BEEN WRONG.
1. This is a JSFiddle Assignment so this needs to be written at THE WEBSITE: jsfiddle.net with both the HTML and Java script included.
2. Implement a Stack in Javascript. Do not use an array as the stack or in the implementation of the stack. Repeat You MUST implement the Stack (start with your linked list) DO NOT USE AN ARRAY.
3. You will build a Stack Computer from your stack.
4. When a number is entered it goes onto the top of the stack.
5. When an operation is entered, the previous 2 numbers are operated on by the operation and the result is pushed onto the top of the stack. This is how an RPN calculator works. For example: 2 [enter] 2 5 [enter] 5 2 * [enter] * 5 2 -> collapses to 10 would leave at 10 at the top of the stack.
6. The program should use a simple input box, either a text field or prompt and display the contents of the Stack.
7. Building A Stack is relatively easy if you have built a List. A Stack is nothing more complex with 2 extra functions added Push(_value) and Pop(). The Push function obviously needs an argument _value. The Pop function should always return the element on the top of the stack and at the same time removing it from the top of the stack.
8. Implementation of a Stack using an array will not be accepted (no grade will be assigned). A stack computer created using a Stack (with correct push and pop) that performs all operations correctly and does not allow bad entries (non-numeric or operation, no operations until 2 numbers on stack).
9. Use nodes, pop and push functions.
**Please show code and an example of successful output**
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started