Esempio n. 1
0
        public List <CherryJuice> GetCherryJuice(decimal massOfFruits)
        {
            List <CherryJuice> cherryJuices    = new List <CherryJuice>();
            CherryJuice        cherryJuicePack = new CherryJuice();

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

            for (int i = 1; i <= (int)orangePacksQty; i++)
            {
                cherryJuices.Add(cherryJuicePack);
            }

            return(cherryJuices);
        }
Esempio n. 2
0
        public List <CherryJuice> GetCherryJuice(decimal massOfFruits)
        {
            List <CherryJuice> cherryJuices = new List <CherryJuice>();

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

            for (int i = 1; i <= orangePacksQty; i++)
            {
                CherryJuice cherryJuicePack = new CherryJuice();
                cherryJuices.Add(cherryJuicePack);
            }

            return(cherryJuices);
        }