//Implementation File:	intStack.cpp
#include "intStack.h"

intStack::intStack()
{
	top=-1;
}

void intStack::push(const int number)
{
	if (full())
		throw pushOnFull();
	//top++;
	s[++top]=number;
}

int intStack::pop()
{
	if (empty())
		throw popOnEmpty();
	return (s[top--]);
}

bool intStack::empty() const
{
	return (top==-1);
}

bool intStack::full() const
{
	return (top==maxSize-1);
}
