In this lab, you will first be implementing and then working with Stacks and Queues. It will be helpful to first refresh your memory of how they work. We have provided you with two java files that provide examples of working with Stacks and Queues, GuessWhatIDo.java
and GuessWhatIDo2.java
Note that Java does not provide a built in Queue
class, but rather has LinkedList
implement the Queue
interface, so in these examples we are using a LinkedList
as our Queue
implementation.
With a partner, look through each of these files, predict what they do, and then run them. Did they do what you expected?
To get credit for this part of the warmup, write up your predictions (and what happened) in a file named warmup.txt
, and add
/commit
/push
it to git.