Java Lab #6: Clacky Stack Operations

The Clacky calculator has a "stack" of values waiting to be operated on. Instead of using an array as we did in Lab #5 it is nicer to use an ArrayList<Integer>. This is because ArrayList objects can grown and shrink dynamically (as needed while the program is running).

In the near future we will extend Clacky to increase it's power and usability. To that end it will prove useful to have methods that perform various stack manipulations. In this lab you will write a few of those methods. This also gives you more practice with manipulating arrays (really ArrayLists) and writing loops.

The file contains five empty methods, with documentation. For this lab you are to implement those methods by filling them in so they perform as according to their documentation. Include a main method that exercises each of the other methods to test them.

Turn in your final program with appropriate comments. Be sure your name is on your submission.