By using an generic ArrayList private member of the Stack class, we can easily implement all the Stack methods. (Details in the lecture example zip file.)
Each Stack method can be implemented simply usually by only invoking an appropriate ArrayList method on the private ArrayList member.
Why not just use an ArrayList instead of a Stack?
The ArrayList member will double in capacity if it gets full and all members must be copied to the ArrayList's new bigger capacity array.
It might be better to use a LinkedList member in Stack rather than an ArrayList.
If we did that, nothing would need to be changed in the Maze application since it would use the same push, pop, etc. methods.