Code example for Deque

Methods: pushsize

        return instance;
    public void addShirt(Shirt shirt) {
        System.out.println("Adding a shirt to the store.");
        System.out.println("Total shirts in stock: " + shirts.size());
    public Shirt takeShirt() { 
        return shirts.pop();
    public int getShirtCount() { 
        return shirts.size();
    public boolean authorizeCreditCard(String accountNumber, double amount) {
        //placeholder method to test workflow 
        //since this would normally communicate with a external source