package com.hithomelabs.clients.module4;

import com.hithomelabs.princeton1.module4.ArrayStack;
import com.hithomelabs.princeton1.module4.Stack;

public class ArrayStackClient {
    public static void main(String[] args) {
        Stack<Integer> stack = new ArrayStack<Integer>();
        for(int i = 0; i < 21; i++){
            stack.push(i);
        }
        // Using object s, as stack is generic but every java Object has implementation of toString()
        for (Object s : stack)
            System.out.println(s);
        while(!stack.isEmpty()){
            System.out.println(stack.pop());
        }
    }
}
