Exemplo n.º 1
0
        public bool IsEligible(Customer cust, int amount)
        {
            Console.WriteLine("{0} applies for {1:C} loan\n",
                cust.Name, amount);

            bool eligible = true;

            // Check creditworthyness of applicant
            if (!_bank.HasSufficientSavings(cust, amount))
            {
                eligible = false;
            }
            else if (!_loan.HasNoBadLoans(cust))
            {
                eligible = false;
            }
            else if (!_credit.HasGoodCredit(cust))
            {
                eligible = false;
            }

            return eligible;
        }
Exemplo n.º 2
0
 public bool HasSufficientSavings(Customer c, int amount)
 {
     Console.WriteLine("Check bank for " + c.Name);
     return true;
 }
Exemplo n.º 3
0
 public bool HasGoodCredit(Customer c)
 {
     Console.WriteLine("Check credit for " + c.Name);
     return true;
 }
Exemplo n.º 4
0
 public bool HasNoBadLoans(Customer c)
 {
     Console.WriteLine("Check loans for " + c.Name);
     return true;
 }