Question: In data structure java(stack) , please solve this tasks 1&2 , i need code and run sample. * i upload picture* Tasks/Assignments(s) 1- Create StackArray
In data structure java(stack) , please solve this tasks 1&2 , i need code and run sample.

* i upload picture*
Tasks/Assignments(s) 1- Create StackArray class in Java that implements Stack using Array and implement all the methods for the following stack operations: push, pop, top, size, isEmpty, is Full, display and makeEmpty. In the main, create object Si from StackArray, push some values and then display the stack elements and print the top and the size of the stack. 2- Create StackLinkedList class in Java that implements Stack using Singly Linked List and implement all the methods for the following stack operations: push, pop, top, size, isEmpty, display and makeEmpty. In the main, create object S2 from StackLinkedList, pop all elements from stack S1 and push them into S2. Then display the elements of stack S1 and stack S2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
