public static void MakePayment(decimal amount, string customerName) { // Some validation or logic on the customer record var customer = CustomerSystem.GetCustomer(customerName); // Submit payment for processing PaymentSystem.MakePayment(amount, customer); }
public static void PurchaseItem(string customerName, string itemName, int quantity) { var item = InventorySystem.GetItem(itemName); var customer = CustomerSystem.GetCustomer(customerName); customer.ShoppingCart.Add(item, quantity); CustomerSystem.UpdateCustomer(customer); }