How to do this question?
You are supposed to implement a dynamic stack that make use of single link list of number type.
a) i) Declare a class NumberNode which contains 2 members. First member is datum if integer type, and second member link which reference to next number in the link list.
ii) Implement the constructor to initialise the data.
iii) Implement all the accesor, and mutator methods found in the class
b) i) Declare a class PowerStack which contains a member top which reference to the top element in the power stack.
iv) Implement a method push to add a new item to the stack
v) Implement a method PrintAll which will display all the data found in the stack
vi) Implement another method which can be use to manipulate the data in the stack.
Sounds like a homework assignment.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL