Exemple #1
0
        public static void RemoveLongestCall(List <Call> callHistory, double price)
        {
            var orderedCalls = callHistory.OrderBy(x => x.Duration).ToList();

            orderedCalls.RemoveAt(orderedCalls.Count - 1);

            var testPrice = GSM.CallsPrice(orderedCalls, price);

            Console.WriteLine("After removing the longest call: {0:F2}", testPrice);
        }
Exemple #2
0
        public static void PrintTestCallPrice(List <Call> callHistory, double price)
        {
            var testPrice = GSM.CallsPrice(callHistory, price);

            Console.WriteLine("\nTotal price of test calls: {0:F2}", testPrice);
        }