Пример #1
0
        static void Main(string[] args)
        {
            LunchBuddy        lunchBuddy  = new LunchBuddy("Frank", "Sinatra");
            LunchBuddy        lunchBuddy2 = new LunchBuddy("Dolly", "Parton");
            LunchBuddy        lunchBuddy3 = new LunchBuddy("John", "Mayer");
            LunchBuddy        lunchBuddy4 = new LunchBuddy("Kendrick", "Lamar");
            List <LunchBuddy> companions  = new List <LunchBuddy>();

            companions.Add(lunchBuddy2);
            companions.Add(lunchBuddy3);
            companions.Add(lunchBuddy4);

            lunchBuddy.eat();
            lunchBuddy.eat("Cocoa Crispies");
            lunchBuddy.eat(companions);
            lunchBuddy.eat("Cocoa Crispies", companions);
        }
Пример #2
0
        static void Main(string[] args)
        {
            var lunchBuddy = new LunchBuddy("Spike", "Lee");

            lunchBuddy.eat();
            lunchBuddy.eat("pizza");
            lunchBuddy.eat(new List <LunchBuddy>
            {
                new LunchBuddy("Deddrick", "Perry"),
                new LunchBuddy("Carla", "Patton"),
                new LunchBuddy("Pierre", "Keys")
            });

            lunchBuddy.eat("nachos", new List <LunchBuddy>
            {
                new LunchBuddy("Pamela", "Patton"),
                new LunchBuddy("Imani", "Ross"),
                new LunchBuddy("Logan", "Ross")
            });
        }
Пример #3
0
        static void Main(string[] args)
        {
            var rando   = new LunchBuddy("Jamie", "Phillips");
            var friend1 = new LunchBuddy("Ronald", "Reagan");

            rando.Eating();
            friend1.eat("spaghetti");
            rando.Company();
            friend1.WhatToEat("Fried Chicken");
            var companion = new LunchBuddy("Jamie", "Phillips");

            Console.ReadLine();
        }