Example #1
0
 //construct
 public Day(Random random)
 {
     this.random = random;
     customer    = new Customer(random);
     customers   = new List <Customer>();
     weather     = new Weather(random);
     weather.GenerateConditions();
     weather.GenerateTemperature();
     GenerateCustomers();
 }
Example #2
0
 public void GenerateWeekForecast()
 {
     for (int i = 0; i < days.Count; i++)
     {
         forecastDay = days[i];
         weather.GenerateTemperature();
         weather.GenerateCondition();
         DisplayGeneratedForecast();
     }
 }
Example #3
0
        public double GeneratingCustomerThirstBasedOnTemperature(Random rnd)
        {
            double checkTemperature = weather.GenerateTemperature();

            if (checkTemperature >= 80 && checkTemperature <= 100)
            {
                thirstFactor = 4;
            }
            else if (checkTemperature >= 60 && checkTemperature <= 80)
            {
                thirstFactor = 3;
            }
            else if (checkTemperature >= 40 && checkTemperature <= 60)
            {
                thirstFactor = 2;
            }
            return(thirstFactor);
        }