Exemplo n.º 1
0
        //public static void Affiche (T objetGenerique)
        //{
        //    Console.WriteLine();
        //}
        static void Main(string[] args)
        {
            //int a = new int();
            //Console.WriteLine(a);
            //Personne nico = new Personne();
            //nico.AfficheAge();

            Affiche <int>(5);
            Affiche <string>("abc");

            //string s = "abc";
            //s.Affiche();

            //Action<double, double, double> puissance = (x, y) => Math.Pow(x, y);
            //Console.WriteLine(Calcul(puissance, 2,3));


            SimulateurMeteo simulateurMeteo = new SimulateurMeteo(1000);
            Statisticien    statisticien    = new Statisticien(simulateurMeteo);

            statisticien.DemarrerAnalyse();
            statisticien.AfficherRapport();

            statisticien.DemarrerAnalyse();
            statisticien.AfficherRapport();

            statisticien.DemarrerAnalyse();
            statisticien.AfficherRapport();

            Console.WriteLine("Fin du test, tapez sur une touche pour sortir");
            Console.ReadKey();
        }
Exemplo n.º 2
0
 public Statisticien(SimulateurMeteo simulateur)
 {
     simulateurMeteo = simulateur;
     nombreDeFoisOuLeTempsAChange = 0;
     nombreDeFoisOuIlAFaitSoleil  = 0;
 }