Hello,
If I want to make a class which is a stack of objects of some specific type
(not just "Objects"), what is the best way to do it?
I wonder if there is some generally accepted "best" way to do this, because
it must come up a lot.
I personally create a new class which mimics all the methods of
java.util.Stack , and keeps a java.util.Stack as a private instance
variable. The new class changes the return types of pop and peek and the
argument type of push. Is this the most elegant solution?
I'm a student programmer, and appreciate any insight.
Adam
-----------------
www.Newsgroup-Binaries.com - *Completion*Ret ention*Speed*
Access your favorite newsgroups from home or on the road
-----------------
If I want to make a class which is a stack of objects of some specific type
(not just "Objects"), what is the best way to do it?
I wonder if there is some generally accepted "best" way to do this, because
it must come up a lot.
I personally create a new class which mimics all the methods of
java.util.Stack , and keeps a java.util.Stack as a private instance
variable. The new class changes the return types of pop and peek and the
argument type of push. Is this the most elegant solution?
I'm a student programmer, and appreciate any insight.
Adam
-----------------
www.Newsgroup-Binaries.com - *Completion*Ret ention*Speed*
Access your favorite newsgroups from home or on the road
-----------------
Comment