Code example for Deque

Methods: size

0
    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 
        //this method should take longer to execute... 
 
        //TODO add delaying code here 
         
        return true; 
    } 
}