hello please i am having issues getting the values of a system generated variables. here is the code for the getting the values from user;
public void DetailsRate()
{
begin1:
Console.WriteLine("\n \t Rate the Acting on a scale of 0 to 5");
RateActing = int.Parse(Console.ReadLine());
switch (RateActing)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
Console.WriteLine("\n you have rated the action of the movie {0}", RateActing);
break;
default:
Console.WriteLine("you have selected the wrong choice {0}", RateActing);
goto begin1;
}
begin2:
Console.WriteLine("\n \t Rate the music of the movie on a scale of 0 to 5");
RateMusic = int.Parse(Console.ReadLine());
switch (RateMusic)
{
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
Console.WriteLine("you have rated the music of the movie {0}", RateMusic);
break;
default:
Console.WriteLine("you have selected the wrong choice {0}", RateMusic);
goto begin2;
}
}
I called the inputed values into this piece of code
public double getoverallRate(double rateact, double ratemus)
{
double totrate = 0;
rateact = RateActing * 0.25;
ratemus = RateMusic * 0.15;
totrate = (rateact + ratemus);
return totrate;
}
and here is the main method
static void Main(string[] args)
{
MovieRating MR = new MovieRating();
MR.DetailsRate();
MovieRating MT = new MovieRating();
double totrate = MT.getoverallRate(1, 2);
Console.WriteLine("total rate is {0}", totrate);
Console.ReadKey();
}
Please what Im i missing the value of totrate is just giving me 0. please help me.