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;
        }
Example #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);
        }