Exemple #1
0
        public List <OrangeJuice> GetOrangeJuice(decimal massOfFruits)
        {
            List <OrangeJuice> orangeJuices    = new List <OrangeJuice>();
            OrangeJuice        orangeJuicePack = new OrangeJuice();

            decimal orangePacksQty = (decimal)massOfFruits / (decimal)_orangesForPress;

            for (int i = 1; i <= (int)orangePacksQty; i++)
            {
                orangeJuices.Add(orangeJuicePack);
            }

            return(orangeJuices);
        }
Exemple #2
0
        public List <OrangeJuice> GetOrangeJuice(decimal massOfFruits)
        {
            List <OrangeJuice> orangeJuices = new List <OrangeJuice>();

            int orangePacksQty = (int)((double)massOfFruits / _orangesForPress);

            for (int i = 1; i <= orangePacksQty; i++)
            {
                OrangeJuice orangeJuicePack = new OrangeJuice();
                orangeJuices.Add(orangeJuicePack);
            }

            return(orangeJuices);
        }