public class dailyMenu
{
private string day="";
private int date = 0;
private static int nextDate=1;
private string entree ="";
private double price;
private double calories;
private static string [] daysOfWeek= {"Monday","Tuesday","Wednesday",
"Thursday", "Friday", "Saturday", "Sunday"};
private static string[] entrees = {"Beef Tenderloin Fresco",
"Madagascar Filet Mignon", "Filet Mignon", " Lobster Ravioli",
"Asian Infused Braised Beef", "New Age Chicken Cordon Bleu",
"Short Ribs", " Beef Wellington","Fajitas", "Bacon Cheeseburger",
"Beef Burgandy", "Spagehetti"};
private static double [] entreePrices= { 5.99,7.99,6.99,4.50,9.99,10.29,
5.67,8.99, 3.99,4.78,10,79,6.98};
private static int[] entreeMealCaloricVal= { 999,1288,770,699,450,999,1500,873, 911,
1011, 777,500};
public dailyMenu()
{
assignDate();
GetDay();
RandPopulate();
}
void assignDate()
{
date = nextDate;
nextDate++;
if (GetDay()== "Friday")
{
nextDate += 2;
}
}
void RandPopulate()
{
Random random = new Random();
int randomNumber = random.Next(0,13);
entree = entrees [randomNumber];
price = entreePrices [randomNumber];
calories = entreeMealCaloricVal [randomNumber];
}
}
The IDE is telling me that line 56, 41, and 14 could be the problem so I'm guessing it has something to do with my random number generator.
Can someone give me a hand?