Word Stack (pushpop) Sample

Description

This program creates two stacks (Stack1 and Stack2) using the default class, IStack. It adds a number of words to Stack1, removes them from Stack1, adds them to Stack2, and finally removes them from Stack2 so that they can be printed. The push() and pop() functions are used for adding and removing elements.

Concept

This program is a sample to demonstrate the use of the default class IStack.

Task

This program uses stacks to push and pop elements.



Copyright (c) Taligent, Inc. 1997.
Copyright (c) IBM Corporation 1997.
All rights reserved.

Permission is granted to copy, use, modify, and merge this software into your applications and to permit others to do any of the foregoing. You must include this permission and copyright notice in all copies and modified versions of this software. THIS SOFTWARE IS PROVIDED IN ITS 'AS IS' CONDITION. TALIGENT AND IBM DISCLAIM ANY LIABILITY OF ANY KIND FOR DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.