home *** CD-ROM | disk | FTP | other *** search
- /*Objective_C Implementation of the Stack Class: Stack.m*/
-
- //EXERCISE: COMPLETE THE PUSH, POP, TOP, AND PRINTSTACK METHODS
-
- #import <stdio.h>
- #import "Stack.h"
-
- @implementation Stack
-
- //Initialize a Stack instance of floating point elements
- -init
- {
- return [self initCount:0 elementSize:sizeof(float) description:"f"];
- //return id of newly created Stack instance
- }
- //Add an element to the stack
- -push: (float)aNumber
- {
-
- }
-
- //Remove an element from the stack
- -(float)pop
- {
-
- }
-
- -(float)top
- {
-
- }
-
- //Print the elements on the stack
- -printStack
- {
-
- }
-
- @end
-