Esempio n. 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();
            }
        }
Esempio n. 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();
            }
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            /*
             * 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
             */
            List <IClassmate> serverSide = new List <IClassmate>();
            List <IClassmate> clientSide = new List <IClassmate>();

            //Instantiate one instance of each of your teammates.
            Jason  jason  = new Jason();
            Jordan jordan = new Jordan();
            Adam   adam   = new Adam();
            Ryan   ryan   = new Ryan();
            Ollie  ollie  = new Ollie();
            Aarti  aarti  = new Aarti();

            serverSide.Add(jason);
            serverSide.Add(aarti);
            serverSide.Add(adam);
            clientSide.Add(ryan);
            clientSide.Add(ollie);
            clientSide.Add(jordan);

            foreach (var s in serverSide)
            {
                s.Work();
            }

            foreach (var c1 in clientSide)
            {
                c1.Work();
            }
        }
Esempio n. 4
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();
            }
        }
Esempio n. 5
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();
            }
        }