// @topic W09-3-020 IntStack class using dynamic array v1
// @brief class IntStack declaration with default constructor and destructor

#ifndef INT_STACK_H_INCLUDED_
#define INT_STACK_H_INCLUDED_

class IntStack 
{
    static const int DEFAULT_SIZE = 1;
    int * memory_block;
    int top_of_stack; // = 0;
    int capacity;
public:
    // constructors and destructor
    IntStack(); // default constructor
    ~IntStack(); // destructor
    // operations
    void push( int value );
    void pop();
    int top();
    int size(); // how many elements stack has
private:
    void allocate_memory( int block_size );
    void reallocate_memory( int block_size );
};//class IntStack

#endif // INT_STACK_H_INCLUDED_