Exemple #1
0
        private static int FindB(object[] a)
        {
            Validator    validator    = new ValidatorExtendPrimeNumber();
            Comparator   comparator   = new ComparatorExtendIsBetter();
            EqualChecker equalChecker = new EqualCheckerNumber();
            Updater      updater      = new LastPosition();

            return(FindEverything(a, validator, comparator, equalChecker, updater));
        }
Exemple #2
0
        private static int FindA(object[] a)
        {
            Validator    validator    = new ValidatorExtendNormalNumber();
            Comparator   comparator   = new ComparatorExtendIsWorse();
            EqualChecker equalChecker = new EqualCheckerNumber();
            Updater      updater      = new FirstPosition();

            return(FindEverything(a, validator, comparator, equalChecker, updater));
        }