예제 #1
0
        public void Review(IncomeBill bill)
        {
            var comments = bill.IncomeBeforeTax - bill.IncomeAfterTax > 50 ?
                           "From Boss: This amount is not allowed" : "From Boss: I am fine with it.";

            Console.WriteLine(comments);
        }
예제 #2
0
        public void Review(IncomeBill bill)
        {
            var comments = bill.IncomeBeforeTax - bill.IncomeAfterTax < 50
                ? "From CPA: This amount is not reasonable"
                : "From CPA: I am fine with it.";

            Console.WriteLine(comments);
        }
예제 #3
0
        private static AccountBook InitializeAccountBook()
        {
            var accountBook = new AccountBook();
            var income      = new IncomeBill {
                IncomeBeforeTax = 100, IncomeAfterTax = 70
            };

            accountBook.AttachBill(income);
            var consume = new ConsumeBill {
                Expense = 150
            };

            accountBook.AttachBill(consume);
            return(accountBook);
        }