Treats the cards[] array in the constructor function Deck() as the data type stack.