Exemplo n.º 1
0
        static void Main(string[] args)
        {
            _totalSalesTaxCalculator = new TotalSalesTaxCalculator(new List <SalesTaxCalculator> {
                new BasicSalesTaxCalculator(salesTaxRate),
                new ImportDutySalesTaxCalculator(salesTaxRate)
            });

            PrintReceipt1();
            PrintReceipt2();
            PrintReceipt3();

            Console.ReadKey();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            _totalSalesTaxCalculator = new TotalSalesTaxCalculator(new List <SalesTaxCalculator> {
                new BasicSalesTaxCalculator(taxRateProvider),
                new ImportDutySalesTaxCalculator(taxRateProvider)
            });

            Console.WriteLine("Output 1:");
            GenerateOutput1();
            Console.WriteLine("Output 2:");
            GenerateOutput2();
            Console.WriteLine("Output 3:");
            GenerateOutput3();

            Console.ReadKey();
        }