Ejemplo n.º 1
0
        public List <Ice> SellIce(int itemsBeingSold, Bank bank)
        {
            List <Ice> newIce = new List <Ice>();
            Ice        ice    = new Ice();

            if (itemsBeingSold != 250)
            {
                for (int i = 0; i < itemsBeingSold; i++)
                {
                    if (bank.SubtractMoney(ice.GetCost()))
                    {
                        newIce.Add(new Ice());
                    }
                }
            }
            else
            if (bank.SubtractMoney(ice.GetBulkCost()))
            {
                for (int i = 0; i < itemsBeingSold; i++)
                {
                    newIce.Add(new Ice());
                }
            }
            return(newIce);
        }
Ejemplo n.º 2
0
        public double NumberOfIceCubesPurchased(int NumberOfIceCubesNeeded)
        {
            Ice ice = new Ice();

            checkOutIceCubes = ice.GetCost() * NumberOfIceCubesNeeded;
            return(checkOutIceCubes);
        }