Exemple #1
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());
        }
Exemple #2
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 #3
0
        static void Main(string[] args)
        {
            Employe   e1 = new Employe("ROCHER", "Oriane", 42, 1350);
            Employe   e2 = new Employe("RENAUD", "Thierry", 33, 1550);
            Employe   e3 = new Employe("BOSSE", "Antoinette", 27, 1450);
            Employe   e4 = new Employe("QUINN", "Patrick", 32, 1570);
            Employe   e5 = new Employe("LAVALLEE", "Samuel", 29, 1450);
            Chef      c1 = new Chef("LEMELIN", "Armand", 45, 1835, "Logistique");
            Chef      c2 = new Chef("MIGNEAU", "Mallory", 44, 1840, "Informatique");
            Directeur d1 = new Directeur("HARQUIN", "Noémie", 53, 2100, "Direction", "Happy Bear Investment");

            Liste maListe = new Liste();

            maListe.InsererDebut(e1);
            maListe.InsererDebut(e2);
            maListe.InsererDebut(e3);
            maListe.InsererDebut(e4);
            maListe.InsererDebut(e5);
            maListe.InsererDebut(c1);
            maListe.InsererDebut(c2);
            maListe.InsererDebut(d1);

            Console.WriteLine("\tListe des employés par énumération");
            foreach (var t in maListe)
            {
                Console.WriteLine(t.Objet);
            }
        }
Exemple #4
0
        static void Main(string[] args)
        {
            Employe e1 = new Employe("Kirigaya", "Kazuto", 17, 2000);
            Employe e2 = new Employe("Yuki", "Asuna", 18, 2000);
            Employe e3 = new Employe("Synthesis Thirty", "Alice", 19, 2000);
            Employe e4 = new Employe("Knight", "Eugeo", 19, 2000);
            Employe e5 = new Employe("Kirigaya", "Suguha", 17, 2000);

            Chef c1 = new Chef("Koujiro", "Rinko", 28, 5000, "RATH");
            Chef c2 = new Chef("Kikuoka", "Kikuoka", 30, 5000, "RATH");

            Directeur d1 = new Directeur("Akihiko", "Kayaba", 30, 7000, "IA", "THE SEED");

            Console.WriteLine("\nListe 1\n");
            Liste liste = new Liste();

            liste.InsererDebut(e1);
            liste.InsererDebut(e2);
            liste.InsererDebut(e3);
            liste.InsererDebut(e4);
            liste.InsererDebut(e5);
            liste.InsererDebut(c1);
            liste.InsererDebut(c2);
            liste.InsererDebut(d1);
            liste.Lister();

            Console.WriteLine("\nListe Vider\n");
            liste.Vider();
            liste.Lister();

            Console.WriteLine("\nListe 2\n");
            liste.InsererFin(e1);
            liste.InsererFin(e2);
            liste.InsererFin(e3);
            liste.InsererFin(e4);
            liste.InsererFin(e5);
            liste.InsererFin(c1);
            liste.InsererFin(c2);
            liste.InsererFin(d1);
            liste.Lister();

            Console.WriteLine("\nListe Element\n");
            Console.WriteLine(liste[0]);
            Console.WriteLine(liste[7]);

            Console.WriteLine("\nListe Foreach\n");

            foreach (var element in liste)
            {
                Console.WriteLine(element.ToString());
            }
        }
        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);
            }
        }