public Computer MakeCashPurchase(Order order, decimal amount)
        {
            var register = new CashRegisterService();
            register.OpenDrawer();
            var change = register.MakeChange(order.Price, amount);

            var computer = store.Build(order, computerBuilder);

            factory.PlaceOrder(order);

            return computer;
        }
예제 #2
0
        public Computer MakeCashPurchase(Order order, decimal amount)
        {
            var register = new CashRegisterService();

            register.OpenDrawer();
            var change = register.MakeChange(order.Price, amount);

            var computer = store.Build(order, computerBuilder);

            factory.PlaceOrder(order);

            return(computer);
        }