Have you tried adding to the stack until it is full? ...and then tried to add again, what happens?
Does your code prevent the addition of a new element when the stack is full from inside the switch...