hello please I am havine an error " Error 1 No overload for method 'getoverallRate' takes 0 arguments" here is the code what I'm I missing?
public int getoverallRate(int rateact, int ratemus, int ratecin, int rateplot, int ratedur)
{
int divisor = 5;
rateact = (RateActing / divisor) * 100;
ratemus = (RateMusic / divisor) * 100;
ratecin = (RateCinema / divisor) * 100;
rateplot = (RatePlot / divisor) * 100;
ratedur = (RateDuratn / divisor) * 100;
int totrate = (rateact + ratemus + ratecin + rateplot + ratedur);
return totrate;
}
public void Display()
{
Console.WriteLine("total rate is- {0}%", getoverallRate());
}
the highlighted portion is underline.

Manas MohapatraPosted Aug 20, 2015, 5:15 AM
Upendra Pratap ShahiPosted Aug 20, 2015, 12:45 PM
Fadugba JeremiahPosted Aug 20, 2015, 12:42 PM
That would be giving the variables value. But what I want is that those parameters should be generated and the result displayed.
Upendra Pratap ShahiPosted Aug 20, 2015, 6:25 AM
Fadugba JeremiahPosted Aug 20, 2015, 6:17 AM
Upendra Pratap ShahiPosted Aug 20, 2015, 6:05 AM
public int getoverallRate(int rateact, int ratemus, int ratecin, int rateplot, int ratedur)
{
int divisor = 5;
rateact = (RateActing / divisor) * 100;
ratemus = (RateMusic / divisor) * 100;
ratecin = (RateCinema / divisor) * 100;
rateplot = (RatePlot / divisor) * 100;
ratedur = (RateDuratn / divisor) * 100;
int totrate = (rateact + ratemus + ratecin + rateplot + ratedur);
return totrate;
}
public void Display()
{
int rateact=2;
int ratemus=4;
int ratecin=5;
int rateplot=3;
int ratedur = 7;
Console.WriteLine("total rate is- {0}%", getoverallRate(rateact, ratemus, ratecin, rateplot, ratedur));
}
Kindly accept the answer.