Implementions of a Stack, Part 2 (Rance Harmon)
This lecture was done from Rance's laptop, using Eclipse. We:
- Showed a short PowerPoint about stacks and ADT's
- Finished implementing the stack ADT as an ArrayList
- Showed an example of how to write a simple unit test with JUnit to test the ArrayList implementation of the stack
- Talked about how to make the instance variables in the Node class visible to other classes (eg., making them public, making the Node class an inner class of Stack, using getters and setters.) and explained why the two latter methods are preferable
- Answered some questions about the outlab.
A code example is posted at website: http://www.cs.montana.edu/~rharmon/CS221/lab.html (bottom of the page).