The upgrade version randomly generates arithmetic topic requirements:
1. Avoid duplication of questions;
2, can be customized topics (number of topics, printing methods);
3, you can choose: whether there is a multiplication method, whether there are brackets, custom range of values, plus or minus negative numbers, Division has no number, whether to support fractions, whether to support decimals, custom line interval and so on.
*********************************************************************************************************
Design ideas:
1, avoid duplication: the output, the identification of the operation symbol, the two operations of the same time, re-randomly generate the operand, and then cycle back to produce the formula.
2, can be customized: Design menu, can choose the number, you can also make the following options.
3, whether there is a multiplication method: The menu has chosen to have the multiplication method, there is no need to modify, no multiplication method, the randomly generated operation symbol will be removed to produce multiplication of the number of possible.
4, whether there are parentheses: if you choose to have parentheses, you can create a 1-2 random number, like an operation symbol, to produce left and right brackets based on a random number.
5, the value range: in the menu can choose to be within 50, 100 or less options, you can generate a random number to determine the range of two operations.
6, plus or minus negative: if you choose a negative number, you do not need to modify, if you choose no negative, then when the operation symbol is a minus sign, to determine whether the first operand is larger than the second, is, or, otherwise, exchange two numbers.
7, Division has no number: can be more than the number, there is no need to modify, the requirement of zero, then the division, the calculation results, if the number of surplus, re-production, with the cycle.
8, whether to support the score: If the score is not supported, there is no need to modify, if the support score in the generation of the operand, add 1-2 parameters, used as the numerator/denominator of the score.
9, whether to support decimals: If you do not support decimals, you do not need to modify; If you support decimals, you can add parameters to determine the decimal and decimal points.
10, each line of the interval adjustment: can be set different specifications, through the change of the tab to determine the size of the interval.
Software Engineering class Assignment (II.)--upgrade version randomly produce arithmetic topic design idea