Exemple #1
0
        static void Main(string[] args)
        {
            var employe1 = new Employe("Liane", "Beaujolie", 18, 1000);
            var employe2 = new Employe("Onfroi ", "Baron", 22, 2000);
            var employe3 = new Employe("Orlene ", "Ratté", 1500);
            var employe4 = new Employe("Felicien ", "Cinq-Mars", 26, 1250);
            var employe5 = new Employe("Madeleine ", "Leclair", 1900);

            var chef1 = new Chef("Édith", "Camus", 3000, "Informatique");
            var chef2 = new Chef("Solaine", "Laframboise", 45, 3000, "Informatique");

            var directeur = new Directeur("Somerville", "Marquis", 4000, "Direction", "Facebook");

            var Liste = new Liste();

            Liste.InsererDebut(employe1);
            Liste.InsererDebut(employe2);
            Liste.InsererDebut(employe3);
            Liste.InsererDebut(employe4);
            Liste.InsererDebut(employe5);
            Liste.InsererDebut(chef1);
            Liste.InsererDebut(chef2);
            Liste.InsererDebut(directeur);

            var ListeEnumeration = new ListeEnumeration(Liste);

            do
            {
                Console.WriteLine(ListeEnumeration.Current().ToString());
                Console.WriteLine(Environment.NewLine);
            }while (ListeEnumeration.MoveNext());
        }
Exemple #2
0
        public static void Main(string[] args)
        {
            Employe   emp1  = new Employe("jean", "michel", 44, 1900.50);
            Employe   emp2  = new Employe("jean", "patrick", 24, 1500);
            Employe   emp3  = new Employe("jean", "moulin", 34, 1500);
            Employe   emp4  = new Employe("jean", "claude", 54, 1500);
            Employe   emp5  = new Employe("jean", "marie", 14, 1500);
            Chef      chef1 = new Chef("marie", "christine", 44, 2300, "RH");
            Chef      chef2 = new Chef("marie", "therese", 44, 2300, "DSI");
            Directeur dir1  = new Directeur("anne", "lise", 44, 2300, "ELITE", "Leclerc");



            Liste personnes = new Liste();

            personnes.InsererDebut(emp1);
            personnes.InsererDebut(emp2);
            personnes.InsererDebut(emp3);
            personnes.InsererDebut(emp4);
            personnes.InsererDebut(emp5);
            personnes.InsererDebut(chef1);
            personnes.InsererDebut(chef2);
            personnes.InsererDebut(dir1);


            ListeEnumeration personnesEnumeration = new ListeEnumeration(personnes);

            do
            {
                Console.WriteLine(personnesEnumeration.Current().ToString());
            }while (personnesEnumeration.MoveNext());
        }
        static void Main(string[] args)
        {
            var employe1 = new employe("lebon", "james", 37, 12000);
            var employe2 = new employe("west", "russel", 30, 2500);
            var employe3 = new employe("harden", "james", 30, 600);
            var employe4 = new employe("kwahi", "leonard", 27, 9000);
            var employe5 = new employe("batum", "nicolas", 22, 2000);



            var chef1 = new chef("man", "marie", 20, 3000, "commercial");
            var chef2 = new chef("Atalia", "bernadette", 25, 5000, "comptable");

            var directeur = new directeur("george", "paul", 30, 15000, "budget", "orange");

            //Declaration de la liste
            var Liste = new Liste();

            Liste.InsererDebut(employe1);
            Liste.InsererDebut(employe2);
            Liste.InsererDebut(employe3);
            Liste.InsererDebut(employe4);
            Liste.InsererDebut(employe5);
            Liste.InsererDebut(chef1);
            Liste.InsererDebut(chef2);
            Liste.InsererDebut(directeur);


            Console.WriteLine(" -- [Affichage de la liste] --");// affichage de la liste
            Liste.Lister();

            var ListeEnumeration = new ListeEnumeration(Liste);



            while (ListeEnumeration.MoveNext())
            {
                Console.WriteLine(ListeEnumeration.Current().ToString());
                Console.WriteLine(Environment.NewLine);
            }
        }