예제 #1
0
        static void Main(string[] args)
        {
            Adam   adam_clientSide   = new Adam();
            Aarti  aarti_clientSide  = new Aarti();
            Tamela tamela_clientSide = new Tamela();
            Jason  jason_serverSide  = new Jason();
            Ryan   ryan_serverSide   = new Ryan();
            Eliza  eliza_serverSide  = new Eliza();

            Console.WriteLine("CLIENT SIDE:");
            List <ITeamMember> clientSide = new List <ITeamMember>();

            clientSide.Add(adam_clientSide);
            clientSide.Add(aarti_clientSide);
            clientSide.Add(tamela_clientSide);
            foreach (var x in clientSide)
            {
                Console.WriteLine(x.fullName);
                x.work();
            }

            Console.WriteLine("");
            List <ITeamMember> serverSide = new List <ITeamMember>();

            serverSide.Add(jason_serverSide);
            serverSide.Add(ryan_serverSide);
            serverSide.Add(eliza_serverSide);

            Console.WriteLine("SERVER SIDE:");
            foreach (var x in serverSide)
            {
                Console.WriteLine(x.fullName);
                x.work();
            }
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("He boo how you been?!");

            Eliza  eliza  = new Eliza();
            Jordan jordan = new Jordan();
            Ryan   ryan   = new Ryan();
            Jackie jackie = new Jackie();
            Ollie  ollie  = new Ollie();
            Tamela tamela = new Tamela();

            List <Iteammate> serverTeam = new List <Iteammate>()
            {
                eliza, jordan, ryan
            };

            List <Iteammate> clientTeam = new List <Iteammate>()
            {
                jackie, ollie, tamela
            };

            foreach (Iteammate member in serverTeam)
            {
                member.Work();
            }

            foreach (Iteammate member in clientTeam)
            {
                member.Work();
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            Kathy    kathy1    = new Kathy("Kathy", "Weisensel", "asking about your dog");
            Tamela   tamela1   = new Tamela("Tamela", "Lerma", "ordering another drink");
            Eliza    eliza1    = new Eliza("Eliza", "Meeks", "wrangling");
            Jackie   jackie1   = new Jackie("Jackie", "Knight", "coding binges");
            Madeline madeline1 = new Madeline("Madeline", "Power", "keepin it classy");
            Chaz     chaz1     = new Chaz("Chaz", "Henricks", "projecting his voice");

            List <IDreamTeam> serverSide = new List <IDreamTeam>();

            serverSide.Add((kathy1));
            serverSide.Add((eliza1));
            serverSide.Add((madeline1));

            List <IDreamTeam> clientSide = new List <IDreamTeam>();

            clientSide.Add((chaz1));
            clientSide.Add((jackie1));
            clientSide.Add((tamela1));

            Console.WriteLine("My client side Dream Team and their specialities:");
            foreach (IDreamTeam item in clientSide)
            {
                Console.WriteLine($"{item.FirstName} {item.LastName} --- {item.Speciality}");
            }
            Console.WriteLine("\n");
            Console.WriteLine("My server side Dream Team and their specialities");
            foreach (IDreamTeam item in serverSide)
            {
                Console.WriteLine($"{item.FirstName} {item.LastName} --- {item.Speciality}");
            }
            Console.WriteLine("\n");
            Console.WriteLine("How does each person contribute to the Dream Team?");
            foreach (IDreamTeam item in clientSide)
            {
                item.Work();
            }
            foreach (IDreamTeam item in serverSide)
            {
                item.Work();
            }
        }