Exemple #1
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);
        }
Exemple #2
0
        public bool IsEligible(Customer cust, int amount)
        {
            Console.WriteLine("{0} applies for {1:C} loan\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);
        }
Exemple #3
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);
        }
        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);
        }
Exemple #5
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);
        }
Exemple #6
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);
        }
Exemple #7
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);
        }
Exemple #8
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);
        }