Example #1
0
            public static void GetTotalPriceFrom(RealEstateAgency rea, decimal price, ITotalPriceCalculator totalPriceCalculator)
            {
                var totalPrice = totalPriceCalculator.CalculateTotalPrice(rea, price);

                Console.OutputEncoding = System.Text.Encoding.UTF8;
                Console.WriteLine("The total price for " + rea.GetType().Name + " is: " + totalPrice + "€");
            }
Example #2
0
            public static void GetCommissionFrom(RealEstateAgency rea, decimal price, ICommissionCalculator commissionCalculator)
            {
                var commissionValue = commissionCalculator.CalculateCommission(rea, price);

                Console.WriteLine("The commission for " + rea.GetType().Name + " is " + commissionValue + "€");
            }