public void If_Customer_has_credit(Customer customer, Action has_credit, Action has_no_credit)
 {
     if(customer.Balance >= 1000.0) {
         has_credit();
     } else {
         has_no_credit();
     }
 }
 public void Checkout(Customer customer)
 {
     If_Customer_has_credit(customer,
         Checkout_with_credit_card,
         Checkout_with_cash);
 }