Пример #1
0
        public void Eat(string food, List <theOGBuddy> companions)
        {
            Resturant location = new Resturant();

            Console.WriteLine($"{first} is at {location.ResturantName}. They ordered {food}. They are with: ");

            foreach (var companion in companions)
            {
                Console.WriteLine(companion.first);
            }
        }
Пример #2
0
        public void Eat(List <theOGBuddy> companions)
        {
            Resturant location = new Resturant();

            Console.WriteLine($"{first} {last} is waiting at {location.ResturantName}.");


            foreach (var companion in companions)
            {
                Console.WriteLine(companion.first);
            }
        }
Пример #3
0
        //Will select a random restaurant name from a list of strings, print to console that the buddy at that restaurant, and ordered the specified food, with the first name of the teammates specified in the list.
        public void Eat(string food, List <LunchBuddy> companions)
        {
            var resturant  = new Resturant();
            var firstNames = new List <string> {
            };

            foreach (var companion in companions)
            {
                var first = companion.Firstname;
                firstNames.Add(first);
            }
            string buddies = string.Join(", ", firstNames);

            Console.WriteLine($" Just ordered some {food} at {resturant.Name} with {buddies}.");
        }
Пример #4
0
        //Will select a random restaurant name from a list of strings, print to console that the buddy is at that restaurant, and also output the first name of each lunch buddy in the specified list.
        public void Eat(List <LunchBuddy> companions)
        {
            var restaurant = new Resturant();
            var firstNames = new List <string> {
            };

            foreach (var companion in companions)
            {
                var first = companion.Firstname;
                firstNames.Add(first);
            }
            string buddies = string.Join(", ", firstNames);

            Console.WriteLine($"{Firstname} {Lastname} is at {restaurant.Name} with {buddies}.");
        }
Пример #5
0
        //creating methods
        //Will select a random restaurant name from a list of strings (List of restaurant names can come from anywhere), print to console that the buddy is at that restaurant, and also return the restaurant.
        public void Eat()
        {
            var resturant = new Resturant();

            Console.WriteLine($"{Firstname} {Lastname} is eating at {resturant.Name}.");
        }
Пример #6
0
        public void Eat()
        {
            Resturant location = new Resturant();

            Console.WriteLine($"{first} {last} is waiting for you at {location.ResturantName}.");
        }
Пример #7
0
 static void Main(string[] args)
 {
     var lunchBuddy = new LunchBuddy("Randy", "Watson");
     var resturant  = new Resturant();
 }