Documente Academic
Documente Profesional
Documente Cultură
Two stacks are the same if they have the same size and their elements at the corresponding
positions are the same. Please do the following:
Add the method equalStack to Class StackClass that takes as a parameter of a StackClass
object, say otherStack and return true if the stack is the same as otherStack (Note: In
StackClass.java, you can have - public boolean equalStack(StackClass<T> otherStack,
which needs to be complete).
Problem 2
For the stack class, please enhance it by the following: