示例#1
0
        protected override void Initialize()
        {
            int tmp = UniversalFunctions.Rand(1, 100);

            tmp %= 4 + 1;
            DivisionTable.Initialize();
            switch (tmp)
            {
            case 1:
                DelGen = FloatingPointNumberFunction.GenerateAddition;
                DelCom = FloatingPointNumberFunction.VerifyAddition;
                break;

            case 2:
                DelGen = FloatingPointNumberFunction.GenerateSubtraction;
                DelCom = FloatingPointNumberFunction.VerifySubtraction;
                break;

            case 3:
                DelGen = FloatingPointNumberFunction.GenerateMultiplication;
                DelCom = FloatingPointNumberFunction.VerifyMultiplication;
                break;

            case 4:
                DelGen = DivisionTableOfFloatingPoints.GetValue;
                DelCom = FloatingPointNumberFunction.VerifyDivision;
                break;

            default:
                break;
            }
        }
示例#2
0
文件: Mix.cs 项目: GrPe/Maths
        public override void Initialize()
        {
            int tmp = UniversalFunctions.Rand(1, 100);

            tmp %= 4 + 1;
            DivisionTable.Initialize();
            switch (tmp)
            {
            case 1:
                DelGen = OrdinaryFractionsFunction.GenerateAddition;
                DelCom = OrdinaryFractionsFunction.VerifyAswers;
                break;

            case 2:
                DelGen = OrdinaryFractionsFunction.GenerateSubtraction;
                DelCom = OrdinaryFractionsFunction.VerifyAswers;
                break;

            case 3:
                DelGen = OrdinaryFractionsFunction.GenerateMultiplication;
                DelCom = OrdinaryFractionsFunction.VerifyAswers;
                break;

            case 4:
                DelGen = OrdinaryFractionsFunction.GenerateDivision;
                DelCom = OrdinaryFractionsFunction.VerifyAswers;
                break;

            default:
                break;
            }
        }