Exemple #1
0
        static void Main(string[] args)
        {
            MobileOperator Life  = new MobileOperator();
            MobileAccount  user1 = new MobileAccount("Dima", "Kobets", new DateTime(1996, 12, 27), "*****@*****.**");
            MobileAccount  user2 = new MobileAccount("Weronika", "Nikolaeva", new DateTime(1996, 2, 12), "*****@*****.**");
            MobileAccount  user3 = new MobileAccount("Kate", "Kos", new DateTime(1996, 12, 2), "*****@*****.**");

            if (user1.Validate() && user2.Validate() && user3.Validate())
            {
                Life.Registrate(user1);
                Life.Registrate(user2);
                Life.Registrate(user3);

                user1.Call(user2.Number);
                user1.SendSms(user2.Number, "Hello world");
                user1.Call(user3.Number);
                user1.Call(user3.Number);

                user2.Call(user3.Number);
                user2.Call(user1.Number);

                user3.Call(user2.Number);

                Life.ShowJornal();
                Life.MostActiveMembers();
                Life.MostPopularNumbers();
            }
            Console.ReadLine();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            MobileOperator Life  = new MobileOperator();
            MobileAccount  user1 = new MobileAccount("Dima", 0674026982);
            MobileAccount  user2 = new MobileAccount("Kate", 0674026983);
            MobileAccount  user3 = new MobileAccount("Weronika", 0674026984);
            MobileAccount  user4 = new MobileAccount("Alex", 0674026985);
            MobileAccount  user5 = new MobileAccount("Wadim", 0674026986);
            MobileAccount  user6 = new MobileAccount("Serg", 0674026987);

            Life.Registrate(user1);
            Life.Registrate(user2);
            Life.Registrate(user3);
            Life.Registrate(user4);
            Life.Registrate(user5);
            Life.Registrate(user6);

            user2.AddToBook(user1);

            user1.Call(0674026983);
            user1.SendSms(0674026983, "Hello world");
            user1.Call(0674026984);
            user1.Call(0674026984);

            user2.Call(0674026984);
            user2.Call(0674026982);

            user3.Call(0674026984);

            user4.Call(0674026986);
            user4.SendSms(0674026982, "Hello world");

            user5.SendSms(0674026985, "Hello world");

            Life.ShowJornal();
            Life.MostActiveMembers();
            Life.MostPopularNumbers();

            Console.ReadLine();
        }