the stack workshop applet is based on an arrayso you'll see an array of data items although it' based on an arraya stack restricts accessso you can' access elements using an index in factthe concept of stack and the underlying data structure used to implement it are quite separate as we noted earlierstacks can also be implemented by other kinds of storage structuressuch as linked lists the new button the stack in the workshop applet starts off with four data items already inserted if you want to start with an empty stackthe new button creates new stack with no items the next three buttons carry out the significant stack operations the push button to insert data item on the stackuse the button labeled push after the first press of this buttonyou'll be prompted to enter the key value of the item to be pushed after you type the value into the text fielda few more presses will insert the item on the top of the stack red arrow always points to the top of the stack--that isthe last item inserted notice howduring the insertion processone step (button pressincrements (moves upthe top arrowand the next step actually inserts the data item into the cell if you reversed the orderyou would overwrite the existing item at top when you're writing the code to implement stackit' important to keep in mind the order in which these two steps are executed if the stack is full and you try to push another itemyou'll get the can' insertstack is full message (theoreticallyan adt stack doesn' become fullbut the array implementing it does the pop button to remove data item from the top of the stackuse the pop button the value popped appears in the number text fieldthis corresponds to pop(routine returning value againnotice the two steps involvedfirstthe item is removed from the cell pointed to by topthen top is decremented to point to the highest occupied cell this is the reverse of the sequence used in the push operation the pop operation shows an item actually being removed from the array and the cell color becoming gray to show the item has been removed this is bit misleadingin that deleted items actually remain in the array until written over by new data howeverthey cannot be accessed after the top marker drops below their positionso conceptually they are goneas the applet shows after you've popped the last item off the stackthe top arrow points to - below the lowest cell this position indicates that the stack is empty if the stack is empty and you try to pop an itemyou'll get the can' popstack is empty message