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