static void Main(string[] args) { Abonent abonent1 = new Abonent(1, "Ivanov", "Ivan", "Ivanovich", "city Dnipro", 123456789, 0, 0, 100, 20); Abonent abonent2 = new Abonent(2, "Nikolov", "Nikolay", "Nikolaevich", "city Kiev", 987654321, 121, 234, 0, 50); Abonent abonent3 = new Abonent(3, "Alexov", "Alex", "Alexeevich", "city Harkov", 187461862, 200, 400, 249, 10); Abonents abonents = new Abonents(); abonents.GetAbonents(abonent1); abonents.GetAbonents(abonent2); abonents.GetAbonents(abonent3); abonents.ShowAbonentsWorldTalk(); Console.WriteLine("_________"); abonents.ShowTopLocalTalk(10); Console.ReadLine(); }
private void Show(Abonent abonent) { Console.WriteLine($"{abonent.UserID}:{abonent.FirstName} {abonent.LastName} {abonent.Otchestvo}, {abonent.Adres}, {abonent.CreditCart}"); Console.WriteLine($"Дебит:{abonent.Debit}; Кредит:{abonent.Credit}; Время разговоров за рубеж: {abonent.TimeWorldTalk}; Время локальных разговоров: {abonent.TimeLockalTalk}"); }
public void GetAbonents(Abonent abonent) { abonents.Add(abonent); }