[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Labs] [More Labs] [Assignments] [Quizzes] [Examples] [Book] [Tutorial] [API]
Back to Introdution to Linear Structures. On to Stack lab.
Held Tuesday, April 13
Summary
Contents
Handouts
Notes
push(o) is just another name for insertAtFront(o)
insertAtFront
pop() is just another name for removeFromFront()
removeFromFront
peek() is just another name for front()
push(o) is just another name for addToEnd(o)
pop() is just another name for deleteLast()
size() or length to
determine that.
null for empty stacks.
isFull,
isEmpty, and peek.
null when the stack is
empty.
add and
remove
public void add(Object elt) {
Node newNode = new Node(elt,top);
top = newNode;
}
public void add(Object elt) {
top = new Node(elt,top);
}
toString method?
equals method?
clone method?
History
Back to Introdution to Linear Structures. On to Stack lab.
[Instructions] [Search] [Current] [Syllabus] [Links] [Handouts] [Outlines] [Labs] [More Labs] [Assignments] [Quizzes] [Examples] [Book] [Tutorial] [API]
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
This page may be found at http://www.math.grin.edu/~rebelsky/Courses/CS152/99S/Outlines/outline.38.html
Source text last modified Wed Apr 14 09:06:55 1999.
This page generated on Wed Apr 14 09:30:51 1999 by SiteWeaver. Validate this page's HTML.
Contact our webmaster at rebelsky@math.grin.edu