[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Links]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[Java 1.4.2 API]
[EIJ]
[CS152 2000F]
[CS153 2004S]
Back to Class Cancelled. On to Project Discussion.
Held: Monday, 25 October 2004
Summary: Today we investigate the first important linear structure: The Stack. A stack collects objects and returns them in the reverse order that they were added.
Related Pages:
Assignments
Notes:
Overview:
put, add an element to the collection
get, get an element from the collection,
removing it from the collection
get requires a non-empty collection, most
collections provide an isEmpty predicate.
get returns is up to
the policy of the particular kind of linear structure.
last in, first out(LIFO) policy.
first in, first out(FIFO) policy.
best firstpolicy. (They therefore need a way to determine what is
best.)
peek returns the object to be returned by
get, but without deleting it.
size returns the number of elements in the structure.
isFull operation.
isFull?
put is typically called push.
get is typically called pop.
peek is typically called top.
Back to Class Cancelled. On to Project Discussion.
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Links]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[Java 1.4.2 API]
[EIJ]
[CS152 2000F]
[CS153 2004S]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Wed Dec 8 10:37:20 2004.
The source to the document was last modified on Thu Aug 26 20:22:23 2004.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/2004F/Outlines/outline.30.html.
You may wish to
validate this document's HTML
;
;
Check with Bobby