Example #1
0
        static void Main(string[] args)
        {
            Bill         bill     = new Bill(15.80, 0.06);
            TippableBill tippable = new TippableBill(8.50, 0.06, 2.00);

            bill.Pay();
            tippable.Pay();
        }
Example #2
0
        static void Main(string[] args)
        {
            Bill billy = new Bill();

            billy.Subtotal = 15.80;
            billy.TaxRate  = 0.06;

            Pay(billy);


            TippableBill tippy = new TippableBill();

            tippy.Subtotal = 8.50;
            tippy.TaxRate  = 0.06;
            tippy.Tip      = 2.00;

            Pay(tippy);
        }