Пример #1
0
        public static int guessResultParams(int x1, int x2, int x3)
        {
            SimpleObjectDelegate obj = new SimpleObjectDelegate(
                new SimpleObject());

            obj.addAbs(x1);
            obj.addAbs(x2);
            obj.addAbs(x3);

            if (obj.getResult() == 10)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }
Пример #2
0
        public static int guessResult(SimpleObjectDelegate obj, int x1,
                                      int x2, int x3)
        {
            if (obj == null)
            {
                return(-1);
            }

            obj.addAbs(x1);
            obj.addAbs(x2);
            obj.addAbs(x3);

            if (obj.getResult() == 10)
            {
                return(1);
            }
            else
            {
                return(0);
            }
        }