Description

You are given an IntStack class that has plenty of error checking in it. However, whenever you do something it doesn't like, it exits the program. This is bad because you don't want IntStack to handle the problem... YOU want to handle the problem. The general rule is that only main should decide if the program should exit... nowhere else. If main can't handle the problem, nobody can. For example, if the stack is empty when we pop, main may know a way to handle it and can avoid exiting.