

public static void abstractedVersion(String[] args) {

    CustomerServiceOrder customerOrder = new FIFOOrder();
    while( agent.isAvailable() ) {
        if( customerOrder.hasNext() ) {
            Customer next = customerOrder.getNextCustomer();
            agent.handle( next );
        }
    }
}


public static void originalVersion(String[] args) {
    while(agent.isAvailable()) {
        if( customerList.size() > 0 ) {
            Customer next = list.remove(0);
            agent.handle( next );
        }
    }
}