public void ProcessPurchase(int customerId, int goodId) { Customer c = Customer.FindCustomer(customerId); Order o = Stock.Find(goodId); CreditCardInfo cci = c.GetCreditCardInfo(); BankGateway gateway = new BankGateway(); gateway.ChargeCard(cci, o); c.AddToStatistics(o); }
void Purchase() { int id = 123; Customer c = Customer.FindCustomer(id); int goodId = 13457; Order o = Stock.Find(goodId); CreditCardInfo cci = c.GetCreditCardInfo(); BankGateway gateway = new BankGateway(); gateway.ChargeCard(cci, o); c.AddToStatistics(o); }