public static void Main(string[] args) { string[] nums = Console.ReadLine().Split(); string[] urls = Console.ReadLine().Split(); Smartphone phone=new Smartphone(nums,urls); phone.Call(); phone.Browse(); }
public static void Main() { var calls = Console.ReadLine() .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var sites = Console.ReadLine() .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); var smartPhone = new Smartphone(calls, sites); Console.WriteLine(smartPhone.Calling()); Console.WriteLine(smartPhone.Browsing()); }
static void Main(string[] args) { string[] phoneNumbers = Console.ReadLine().Split().ToArray(); string[] webSites = Console.ReadLine().Split().ToArray(); Smartphone smartphone = new Smartphone(); foreach (var number in phoneNumbers) { Console.WriteLine(smartphone.Call(number)); } foreach (var site in webSites) { Console.WriteLine(smartphone.Browse(site)); } }
static void Main() { var smartphone = new Smartphone(); var numbersInput = Console.ReadLine().Split(); var urlsInput = Console.ReadLine().Split(); foreach (var number in numbersInput) { smartphone.Call(number); } foreach (var url in urlsInput) { smartphone.Browse(url); } }
private static void CallNumbers(Smartphone smarthphone) { string[] phoneNumbers = Console.ReadLine().Split(); foreach (var phoneNumber in phoneNumbers) { try { Console.WriteLine(smarthphone.Call(phoneNumber)); } catch (ArgumentException ae) { Console.WriteLine(ae.Message); } } }
private static void BrowseSites(Smartphone smarthphone) { string[] sites = Console.ReadLine().Split(); foreach (var site in sites) { try { Console.WriteLine(smarthphone.Browse(site)); } catch (ArgumentException ae) { Console.WriteLine(ae.Message); } } }
static void Main(string[] args) { string[] phonenumbers = Console.ReadLine().Split(); string[] websites = Console.ReadLine().Split(); Smartphone smartphone = new Smartphone(); foreach (var number in phonenumbers) { smartphone.Call(number); } foreach (var website in websites) { smartphone.Visit(website); } }
public static void Main() { var phone = new Smartphone(); var numbers = Console.ReadLine().Split(' '); var websites = Console.ReadLine().Split(' '); foreach (var number in numbers) { Console.WriteLine(phone.Call(number)); } foreach (var website in websites) { Console.WriteLine(phone.Browse(website)); } }
public static void Main(string[] args) { string[] phoneNumbers = Console.ReadLine().Split(); string[] urls = Console.ReadLine().Split(); Smartphone smartphone = new Smartphone("Iphone"); for (int i = 0; i < phoneNumbers.Length; i++) { Console.WriteLine(smartphone.Calling(phoneNumbers[i])); } for (int i = 0; i < urls.Length; i++) { Console.WriteLine(smartphone.Browsing(urls[i])); } }
static void Main(string[] args) { var numbers = Console.ReadLine().Split(); var websites = Console.ReadLine().Split(); var smartphone = new Smartphone(); foreach (var number in numbers) { Console.WriteLine(smartphone.Call(number)); } foreach (var website in websites) { Console.WriteLine(smartphone.Browse(website)); } }
public static void Main() { string[] numbers = Console.ReadLine().Split(); string[] urlAddresses = Console.ReadLine().Split(); Smartphone phone = new Smartphone(); foreach (string number in numbers) { Console.WriteLine(phone.Call(number)); } foreach (string urlAddress in urlAddresses) { Console.WriteLine(phone.Browse(urlAddress)); } }
public static void Main() { var numbers = Console.ReadLine().Split(); var urls = Console.ReadLine().Split(); Smartphone smartphone = new Smartphone(); foreach (var number in numbers) { Console.WriteLine(smartphone.Calling(number)); } foreach (var url in urls) { Console.WriteLine(smartphone.Browsing(url)); } }
static void Main(string[] args) { ICallable call = new Smartphone(); IBrowseable browse = new Smartphone(); var numbers = Console.ReadLine().Split(); foreach (var phone in numbers) { Console.WriteLine(call.Call(phone)); } var sites = Console.ReadLine().Split(); foreach (var site in sites) { Console.WriteLine(browse.Browse(site)); } }
public static void Main() { var smartphone = new Smartphone(); var numbers = Console.ReadLine().Split(); var sites = Console.ReadLine().Split(); foreach (var number in numbers) { smartphone.Call(number); } foreach (var site in sites) { smartphone.Brows(site); } }
static void Main(string[] args) { Smartphone smartPhone = new Smartphone(); string[] phoneInput = Console.ReadLine().Split(); string[] urlInput = Console.ReadLine().Split(); for (int i = 0; i < phoneInput.Length; i++) { Console.WriteLine(smartPhone.Calling(phoneInput[i])); } for (int i = 0; i < urlInput.Length; i++) { Console.WriteLine(smartPhone.Browsing(urlInput[i])); } }
public static void Main() { var smartPhone = new Smartphone(); var phoneNumbers = Console.ReadLine().Split(' '); var webSites = Console.ReadLine().Split(' '); foreach (var phoneNumber in phoneNumbers) { var result = smartPhone.Call(phoneNumber); Console.WriteLine(result); } foreach (var webSite in webSites) { var result = smartPhone.Browse(webSite); Console.WriteLine(result); } }
static void Main() { var phoneNumbers = Console.ReadLine() .Split(new[] { ' ' }); var websites = Console.ReadLine() .Split(new[] { ' ' }); var smartphone = new Smartphone(); foreach (var phoneNumber in phoneNumbers) { Console.WriteLine(smartphone.CallPhone(phoneNumber)); } foreach (var website in websites) { Console.WriteLine(smartphone.BrowseWebsite(website)); } }
public static void Main() { var phoneNumbers = Console.ReadLine() .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .ToList(); var websites = Console.ReadLine() .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .ToList(); var smartphone = new Smartphone(); phoneNumbers .ForEach(p => smartphone.AddNumber(p)); websites .ForEach(w => smartphone.AddSite(w)); smartphone.Print(); }
private static void Main() { string[] phones = Console.ReadLine().Split(); string[] websites = Console.ReadLine().Split(); Smartphone smartphone = new Smartphone(); foreach (var phone in phones) { smartphone.AddPhone(phone); } foreach (var website in websites) { smartphone.AddWebsite(website); } Console.WriteLine(smartphone.Call()); Console.WriteLine(smartphone.Browse()); }
public static void Main(string[] args) { string[] phoneNumbers = Console.ReadLine().Split(" ", StringSplitOptions.RemoveEmptyEntries); string[] websites = Console.ReadLine().Split(" ", StringSplitOptions.RemoveEmptyEntries); Smartphone smartphone = new Smartphone(); StationaryPhone stationary = new StationaryPhone(); foreach (var number in phoneNumbers) { try { string result = number.Length == 10 ? smartphone.Call(number) : stationary.Call(number); Console.WriteLine(result); } catch (InvalidOperationException ex) { Console.WriteLine(ex.Message); } } foreach (var url in websites) { try { string result = smartphone.Browse(url); Console.WriteLine(result); } catch (InvalidOperationException ex) { Console.WriteLine(ex.Message); } } }
private static void Calling(string num) { ICallable number = new Smartphone(); Console.WriteLine(number.Calling(num)); }
private static void Browsing(string url) { IBrowsing webSite = new Smartphone(); Console.WriteLine(webSite.Browsing(url)); }
public Engine(Smartphone smartphone) { this.smartphone = smartphone; }
public Engine() { this.smartphone = new Smartphone(); }
public static void Main() { Smartphone phone = new Smartphone("Smartphone"); TestPhone(phone); }