Implemented stack ADT using an array.