Esempio 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);
        }
Esempio 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);
        }