Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Bill         bill         = new Bill(15.80, 0.06);
            TippableBill tippableBill = new TippableBill(8.50, 0.06, 2.00);

            Pay(bill);
            Pay(tippableBill);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Bill bill = new Bill
            {
                Subtotal = 15.80,
                TaxRate  = 0.06
            };

            Pay(bill);

            TippableBill tippedBill = new TippableBill
            {
                Subtotal = 8.50,
                TaxRate  = 0.06,
                Tip      = 2.00
            };

            Pay(tippedBill);
        }