Exemplo n.º 1
0
Arquivo: Orange.cs Projeto: LisP94/OOP
 public Orange()
 {
     var random = new Random();
     Color = "Orange";
     Juiciness = random.Next(10, 100);
     int countOfSlice = random.Next(8, 12);
     Slice = new OrangeSlice[countOfSlice];
     for (int i = 0; i < countOfSlice; i++)
     {
         Slice[i] = new OrangeSlice();
         Slice[i].GrainCount = random.Next(100, 500);
         Slice[i].SeedCount = random.Next(0, 4);
     }
     Taste = "Sweet";
     Weight = random.Next(10, 100);
 }
Exemplo n.º 2
0
        public Orange()
        {
            var random = new Random();

            Color     = "Orange";
            Juiciness = random.Next(10, 100);
            int countOfSlice = random.Next(8, 12);

            Slice = new OrangeSlice[countOfSlice];
            for (int i = 0; i < countOfSlice; i++)
            {
                Slice[i]            = new OrangeSlice();
                Slice[i].GrainCount = random.Next(100, 500);
                Slice[i].SeedCount  = random.Next(0, 4);
            }
            Taste  = "Sweet";
            Weight = random.Next(10, 100);
        }