예제 #1
0
        public static void TestCallHistory()
        {
            Call call0 = new Call("31.3.2015 9:08:33", "00359 888888", 60);
            Call call1 = new Call("01.4.2015 22:19:04", "+44 123123", 578);
            Call call2 = new Call("02.05.2016 02:16:00", "02 967 2323", 134);

            gsm.AddCall(call0);
            gsm.AddCall(call1);
            gsm.AddCall(call2);

            gsm.ShowCallHistory();

            decimal pricePerMinute = 0.37m;

            Console.WriteLine("Total price: {0:C}", gsm.CalculateTotalPriceOfCalls(pricePerMinute));

            gsm.DeleteCall(1);

            Console.WriteLine("Total price: {0:C}", gsm.CalculateTotalPriceOfCalls(pricePerMinute));

            gsm.ClearCallHistory();

            gsm.ShowCallHistory();
        }