Beispiel #1
0
        static void Main(string[] args)
        {
            MobileOperator mobileOperator = new MobileOperator();
            var            acc1           = mobileOperator.CreateAccount(0930575249);
            var            acc2           = mobileOperator.CreateAccount(1234565656);
            var            acc3           = mobileOperator.CreateAccount(1232123123);

            acc2.AddContact(acc1.Number, "First", "Contact");

            acc1.AddMonay(50);
            acc1.Call(acc2.Number);

            Console.WriteLine();

            acc1.AddContact(acc3.Number, "Third", "Contact");
            acc3.SendMessage(acc1.Number, "Hello");
            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var mobileOperator = new MobileOperator();

            var mobileAccount1 = new MobileAccount("Max", "Kh", new DateTime(1998, 6, 23), "*****@*****.**");
            var mobileAccount2 = new MobileAccount("Alex", "Kh", new DateTime(1992, 11, 27), "*****@*****.**");

            mobileOperator.AddNumber(mobileAccount1);
            mobileOperator.AddNumber(mobileAccount2);

            Console.WriteLine(mobileAccount1.Number);
            Console.WriteLine(mobileAccount2.Number);

            mobileAccount1.MakeCall(mobileAccount2.Number);

            mobileAccount2.MakeCall(mobileAccount1.Number);

            mobileAccount1.SendMessage(mobileAccount2.Number, "Message text");

            mobileOperator.Log.MostFrequentlyReceivingNumbers(5);
        }
Beispiel #3
0
 public MobileAccount(int number, MobileOperator mobileOperator)
 {
     _number = number;
 }