Step 1: Get the files

The only file you need for this lab is exceptions.cpp. This file contains the main and the IntStack Class.

The IntStack class works in the following way:
When constructed, it allocates a vector to have a certain size. This size will not change and limits the amount of items that can go in the stack. IntStack also has two functions that are usually included with stacks: push and pop. Push adds an item to the stack; this can error if the stack doesn't have any more room. Pop removes the most recently added item; this can error if the stack is empty. The stack keeps track of the top with an unsigned int called cur_index. This number stores the index that will be pushed onto next. For example, if cur_index is 0, the stack is empty and the next pushed item will be placed in index 0 of the vector.

Main works in the following way: There are three tests that specifically trigger each error case.