I have 3 methods.
1 method holding the value of 3000 1 method holding the value of 0.13
and I have created another method that I want to multiply these two figures together.
public override int FishPerTank()
{
return 3000;
}
public override double WeightOut(double weightOut, double weightIn)
{
return 0.13;
}
public override int HowMuchTheFishWeighOutKG()
{
return (FishPerTank() * WeightOut());
}
I am receiving the syntax error on the WeightOut here:
public override int HowMuchTheFishWeighOutKG()
{
return (FishPerTank() * WeightOut());
}
WeightOut
expect 2 parameters and you're not providing them
WeightOut(double weightOut, double weightIn)
is declared with two parameters and you're calling it with none. Hence the error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With