Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Eliza eliza = new Eliza();

            eliza.Speciality = "Analytical";
            eliza.FirstName  = "Eliza";
            eliza.LastName   = "Meeks";

            Chaz chaz = new Chaz();

            chaz.Speciality = "Enthusiastic";
            chaz.FirstName  = "Chaz";
            chaz.LastName   = "Henricks";

            Andrew andrew = new Andrew();

            andrew.Speciality = "Accepting";
            andrew.FirstName  = "Andrew";
            andrew.LastName   = "Rock";

            Ryan ryan = new Ryan();

            ryan.Speciality = "Determined";
            ryan.FirstName  = "Ryan";
            ryan.LastName   = "McCarty";

            Jason jason = new Jason();

            jason.Speciality = "Sarcasm";
            jason.FirstName  = "Jason";
            jason.LastName   = "Smith";

            Jordan jordan = new Jordan();

            jordan.Speciality = "Enjoyable";
            jordan.FirstName  = "Jordan";
            jordan.LastName   = "Dhaenens";

            List <IClassmate> serverSide = new List <IClassmate>();
            List <IClassmate> clientSide = new List <IClassmate>();

            serverSide.Add(eliza);
            serverSide.Add(chaz);
            serverSide.Add(andrew);

            clientSide.Add(jason);
            clientSide.Add(ryan);
            clientSide.Add(jordan);

            foreach (IClassmate server in serverSide)
            {
                server.Work();
            }
            foreach (IClassmate client in clientSide)
            {
                client.Work();
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            // Your job is to pick 5 of your teammates in your cohort and build a class for each one. Each teammate should have the following properties/methods. Build one for yourself, as well.

            // Specialty property - This holds the technology that the person enjoys the most.
            // FirstName property
            // LastName property
            // FullName property - This property is a readonly property that returns the first and last name concatenated.
            // Work() method - This will write a comical message to the console that describes the work they will do on a group project, based on their speciality.
            // Once you're done, you should have 6 different types in total, each with the properties and methods above.
            Chaz   chaz   = new Chaz();
            Eliza  eliza  = new Eliza();
            Ryan   ryan   = new Ryan();
            Jordan jordan = new Jordan();
            Jason  jason  = new Jason();


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

            FeatureTeam.Add(chaz);
            FeatureTeam.Add(eliza);
            FeatureTeam.Add(jason);


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

            BugTeam.Add(ryan);
            BugTeam.Add(jordan);
            // Create two groups (i.e. List) that will hold three teammates each. These two lists represent one team that will be the server side team, and one that will be the client side team.
            // Instantiate one instance of each of your teammates.
            // Put your teammates into the appropriate team.


            //Write two foreach loops that iterate over each List and makes each of the teammates do their work.

            foreach (var i in FeatureTeam)
            {
                i.Work();
            }

            foreach (var n in BugTeam)
            {
                n.Work();
            }
        }
Ejemplo n.º 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();
            }
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Ben      ben      = new Ben();
            Chaz     chaz     = new Chaz();
            Jordan   jordan   = new Jordan();
            Madeline madeline = new Madeline();
            Matt     matt     = new Matt();
            Mitchell mitchell = new Mitchell();

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

            clientSide.Add(ben);
            clientSide.Add(chaz);
            clientSide.Add(jordan);

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

            serverSide.Add(madeline);
            serverSide.Add(matt);
            serverSide.Add(mitchell);

            Console.WriteLine("Client Side teammates: ");
            foreach (IDreamTeam teammate in clientSide)
            {
                Console.WriteLine(teammate.FullName);
            }

            Console.WriteLine("Server Side teammates: ");
            foreach (IDreamTeam teammate in serverSide)
            {
                Console.WriteLine(teammate.FullName);
            }
        }