Пример #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);
        }
Пример #2
0
        public bool IsEligible(Customer c, int amount)
        {
            Console.WriteLine("{0} applies for {1:C} loan\n",
                              c, amount);

            var eligible = true;

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

            return(eligible);
        }
Пример #3
0
        public bool IsEligible(Customer customer, int ammount)
        {
            Console.WriteLine("{0} applies for {1}", customer.Name, ammount);

            if (!bank.HasSufficientSavings(customer, ammount))
            {
                return(false);
            }
            if (!loan.HasNoBadLoad(customer))
            {
                return(false);
            }
            if (!credit.HasGoodCredit(customer))
            {
                return(false);
            }
            return(true);
        }
Пример #4
0
        public bool IsEligible(Customer customer, int amout)
        {
            bool result = true;

            if (!_bank.HasSufficientSavings(customer, amout))
            {
                result = false;
            }

            if (!_loan.HasNoBadLoans(customer))
            {
                result = false;
            }

            if (!_credit.HasGoodCredit(customer))
            {
                result = false;
            }
            return(result);
        }
Пример #5
0
        public bool IsEligible(Customer customer, int amount)
        {
            Console.WriteLine($"{customer.Name} applies for {amount} loan\n");

            bool isEligible = true;

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

            return(isEligible);
        }
Пример #6
0
        public bool IsEligible(Student student, int amount)
        {
            Console.WriteLine("{0} ubiega się o {1:C} pożyczki. \n", student.Name, amount);

            bool eligible = true;

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

            return(eligible);
        }
Пример #7
0
        public bool IsEligible(Student stud, int amount)
        {
            Console.WriteLine("{0} applies for {1:C} loan\n",
                              stud.Name, amount);

            bool eligible = true;

            // Verify creditworthyness of applicant
            if (!bank.HasSufficientSavings(stud, amount))
            {
                eligible = false;
            }
            else if (!loan.HasNoBadLoans(stud))
            {
                eligible = false;
            }
            else if (!credit.HasGoodCredit(stud))
            {
                eligible = false;
            }

            return(eligible);
        }
Пример #8
0
        public bool IsEligible(Customer customer, int amount)
        {
            Console.WriteLine("{0} aplica para un préstamo de {1:C}\n",
                              customer.Name, amount); //{1:C} ':C' da al int formato monetario(Currency)

            bool eligible = true;

            // Revisa si el aplicante es acreditable para el prestamo
            if (!_bank.HasSufficientSavings(customer, amount))
            {
                eligible = false;
            }
            else if (!_loan.HasNoBadLoans(customer))
            {
                eligible = false;
            }
            else if (!_credit.HasGoodCredit(customer))
            {
                eligible = false;
            }

            return(eligible);
        }
Пример #9
0
        public bool IsEligible(Customer cust, int amount)
        {
            Console.WriteLine("{0} se aplica al  {1:C} préstamo\n",
                              cust.Name, amount);

            bool eligible = true;

            // Comprobar la solvencia del solicitante

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

            return(eligible);
        }