Ejemplo n.º 1
0
        public double Calculate()
        {
            FoodCalculator food       = new FoodCalculator();
            double         totalFruit = food.GetFoodRate("fruit");

            return(totalFruit);
        }
        public double Calculate()
        {
            FoodCalculator food      = new FoodCalculator();
            double         totalMeat = food.GetFoodRate("meat");

            return(totalMeat);
        }
Ejemplo n.º 3
0
 public IActionResult GetFoodEquivalence(FoodCalculatorViewModel model)
 {
     if (ModelState.IsValid)
     {
         var foodCalculator = new FoodCalculator(model.FoodName, model.Quantity);
         return(View(foodCalculator));
     }
     return(View("Index"));
 }
Ejemplo n.º 4
0
 public void Setup()
 {
     _perDayCalculator = new PerDayCalculator();
     fd = new FoodCalculator();
 }