Ejemplo n.º 1
0
        public void Run()
        {
            string[] phoneNumbers = Console.ReadLine().Split();
            string[] urls         = Console.ReadLine().Split();

            foreach (var phoneNumber in phoneNumbers)
            {
                try
                {
                    Console.WriteLine(smartPhone.Calling(phoneNumber));
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }

            foreach (var url in urls)
            {
                try
                {
                    Console.WriteLine(smartPhone.Browse(url));
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
        }
Ejemplo n.º 2
0
    static void Main()
    {
        var numberList = Console.ReadLine()
                         .Split();

        var urlList = Console.ReadLine()
                      .Split();

        var smartPhone = new SmartPhone();

        foreach (var num in numberList)
        {
            Console.WriteLine(smartPhone.Calling(num));
        }

        foreach (var url in urlList)
        {
            Console.WriteLine(smartPhone.Browsing(url));
        }
    }