static void Main()
        {
            Mortgage mortgage = new Mortgage();

            Customer customer = new Customer("Arthur");
            bool eligible = mortgage.IsEligible(customer, 96);

            Console.WriteLine("\n" + customer.Name +
                " has been deemed " + (eligible ? "worthy" : "not worthy"));

            Console.ReadKey();
        }
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        static void Main()
        {
            // Facade
            Mortgage mortgage = new Mortgage();

            // Evaluate mortgage eligibility for customer
            Customer customer = new Customer("Ann McKinsey");
            bool eligible = mortgage.IsEligible(customer, 125000);

            Console.WriteLine("\n" + customer.Name +
                " has been " + (eligible ? "Approved" : "Rejected"));

            // Wait for user
            Console.ReadKey();
        }
 public bool HasNoBadLoans(Customer c)
 {
     Console.WriteLine("Check loans for " + c.Name);
     return true;
 }
 public bool HasGoodCredit(Customer c)
 {
     Console.WriteLine("Check credit for " + c.Name);
     return true;
 }
        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;
        }
 public bool HasSufficientSavings(Customer c, int amount)
 {
     Console.WriteLine("Check bank for " + c.Name);
     return true;
 }
 public bool HasSufficientSavings(Customer c, int amount)
 {
     Console.WriteLine("Inspect " + c.Name + "'s courage");
     return true;
 }
 public bool HasNoBadLoans(Customer c)
 {
     Console.WriteLine("Inspect " + c.Name + "'s leadership.");
     return true;
 }
 public bool HasGoodCredit(Customer c)
 {
     Console.WriteLine("Inspect " + c.Name + "'s pureness of heart.");
     return true;
 }
        public bool IsEligible(Customer cust, int amount)
        {
            Console.WriteLine("{0}, level: {1} Tries to enter the last level to fight the boss.\n",
                cust.Name, amount);

            bool eligible = true;

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

            return eligible;
        }