Question: 5. Go to the printStack method. Above the for loop, type `myOpStack', then type a period and see what methods NetBeans offers you for

5. Go to the printStack method. Above the for loop, type `myOpStack', then type a period and see what methods NetBeans offers you for this stack. You should see something like this: } ationUndo (run) myOpStack. for (Dra Syst } Operation {name=Char Operation{name=Drav new op on top of s g stack: Operation {name=Char Operation {name=Drav Since m1 add (DrawingOp e) boolean void boolean add (int index, DrawingOp element) addAll(Collection c) o copy Into (Object[] anArray) elementAt(int index) o elements () empty() ensureCapacity (int minCapacity) equals (Object o) Operation{name=Char current op at top ofirstElement() g stack: Object boolean boolean void DrawingOp Enumeration boolean void boolean DrawingOp g stack: o elements () empty() Operation {name=Char Operation {name=Drav Operation {name=Char equals (Object o) current op at top ofirstElement() g stack: ensureCapacity (int minCapacity) Enumeration boolean void boolean DrawingOp There are many methods here, because Java's stack implementation inherits from another collection, Vector. If you scroll through this list, what do you notice about the operations that are specific to a Stack (such as push and pop)? 6. What methods are available for Java stack objects that really shouldn't be, given how a stack operates and what it is designed to do?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
