public bool AddDish(Dish dish)//adds a dish { if (dish.Calories <= 0) { throw new Exception("dish calories not possible"); } if (dish.dishNumber < 0) { throw new Exception("dish number not possible"); } if (dish.dishPrice < 0 && dish.dishPrice > 1000) { throw new Exception("dish number not possible"); } if (dish.Rate <= 0 && dish.Rate > 10) { throw new Exception("dish rate is in between 0 to 10"); } return(dal.AddDish(dish)); }