예제 #1
0
        //test the call history functionality
        static void Main()
        {
            //Create a new mobile phone
            GSM mobile = new GSM("Xperia", "Sony", 670.99, "Kitty");

            //Get information about created mobile phone
            mobile.ToString();

            //Get information about static field iPhone
            GSM.IPhone4S.ToString();

            //Add calls and print
            mobile.AddCalls(DateTime.Now, "+359 885 440 340", 1);
            mobile.AddCalls(DateTime.Now, "+359 886 789 451", 94);
            mobile.PrintCalls();

            //Delete call and print
            mobile.DeleteCalls(2);
            mobile.PrintCalls();

            //Calculate total price
            mobile.CalculateFinalPrice(0.35);

            //Clear calls and print
            mobile.ClearCalls();
        }