|
structuring the program
Hi im new to java and trying to write my first program (using stacks).
Im somewhat confused about how to structure the program. Im use to using a modular language similar to pascal.
So im trying to implent a stack and operations associated (constructors, observers, modifiers).
Pop, Push Isempty etc...
Firstly i need to create a new stack. Will this be my Class?
The operations associated need to be there too (im use to writing procedures for each operation, within one module). Im unsure about how to pass numbers or objects to be inserted into the empty stack - how to initialise it and where.
Could somewhat just outline the structure they would expect to use (not so much code but layout).
thanks
|