October 1999
Beginner
304 pages
7h 11m
English
OK, where do we start? In general, we start with an abstraction. Consider a stack. A stack is a fundamental abstraction of computer science. It allows for the nesting and retrieval of values in a last-in, first-out sequence. We nest values by pushing a new value onto the stack, and we retrieve them by popping the last value pushed on the stack. Other operations that users often require are to ask whether a stack is full or empty and to determine the size of the stack. A stack may also support peeking at the last value pushed on the stack.
In the description of a stack I italicized the words that represent operations that users will likely want to apply to objects of our stack class.
What type of elements should ...
Read now
Unlock full access