Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            NationalTax nt = new NationalTax();
            Book        b  = new Book(nt)
            {
                Price = 100
            };

            ImportedTax it = new ImportedTax();
            Magazine    m  = new Magazine(it)
            {
                Price = 10
            };

            Console.WriteLine($" Book Tax: {b.CalculateTax()} \t Magazine Tax {m.CalculateTax()} ");

            Console.Read();
        }