lab5_001 - 15-121 FALL 2009 [CORTINA]LAB 5In this lab, you...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 15-121 FALL 2009 [CORTINA]LAB 5In this lab, you will implement a new version of the ArrayStack class and then test it with the applications given in lecture. EXERCISESDownload the Stacks.zipproject file discussed in lecture. 1. Create a new class named ArrayStack2that implements a stack where the top of the stack is always stored in position 0 of the array. When an element is pushed on this stack, the elements on the stack must be shifted to make room for the new element. Likewise, when an element is popped from this stack, the elements on the stack must be shifted the opposite direction to fill in the gap left by the removed element. Your class should implement the LIFOStackinterface so it must include all of the required methods specified by that interface in the project. Test your ArrayStack2class by changing the PostfixEvaluatorclass so that it uses a stack of type ArrayStack2instead of ListStack....
View Full Document

Page1 / 2

lab5_001 - 15-121 FALL 2009 [CORTINA]LAB 5In this lab, you...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online