Personal operations of software engineering 02 -- version 2 and version 2 of software engineering 02
Note:
/*
The first version can automatically generate 30 arithmetic questions for the four primary keys. In addition to integers, the first version also supports the four arithmetic operations of false scores.
This is to first change the first version of the oriented process to object-oriented, and then design the second version.
The requirements for the second edition are:
1. Avoid repeated questions ;_
2. Customizable (quantity/printing mode );_
3. You can control the following parameters:
Whether multiplication or division exists;
Whether there are Parentheses (a maximum of 10 supported for calculation );
Value range;
Add or subtract negative numbers;
Division has no remainder!
The limit for the second version is up to 2000 questions.
If you want to do not repeat, you need to represent the divisor and the divisor in an array respectively so that you can use them later to compare whether there are duplicates.
When determining whether the number is repeated, the method used is not to judge the first number at a time and the second number and the symbols are equal at the same time. In this way, three values need to be compared each time;
I used to first judge the first one. If it is the same as the one above, compare the second one. If the second one is the same, compare the symbols. In this way, only when one is satisfied,
Otherwise, you do not need to compare them at all, so you can simplify the comparison process.
The idea of this program is different from the current programming philosophy: Output all the conditions for the user to choose.
Then, the selected conditions are randomly displayed based on the conditions. For example, if there is multiplication or division, it will appear randomly. If not, it will not appear.
It is probably based on the idea of adding, querying, deleting, and other programs in the freshman address book.
The main of this program implements the above idea, which is much clearer than the first second version. However, questions are still avoided; customizable (quantity, whether there is multiplication or division, and Numerical range.
*/
Main: