public Tierfutter(string name, string geschmack, FutterSorte sorte, FutterArt art, Dictionary <float, float> tabelle) { Name = name; Geschmack = geschmack; Sorte = sorte; Art = art; Tabelle = tabelle; RegressionsgeradeBerechnen(); }
public float FutterMengeBerechnen(Tierfutter futter, FutterSorte sorte, float gewicht, int portionen) { float antwort = 0; if (futter != null) { antwort = futter.FuttermengeBerechnen(gewicht) / portionen; } else { throw new InvalidOperationException("Kein Futter übergeben"); } return(antwort); }